Produce the requested section count when feasible
This commit is contained in:
@@ -1192,6 +1192,20 @@ func TestSubprocessTranscriptPreflightWithoutReporting(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
func TestSubprocessInfeasibleSectionTargetIsAnInputFailure(t *testing.T) {
|
||||
f := newProcessFixture(t, "normal", "[grammar]")
|
||||
code, stdout, stderr := f.run(t, true, "--target-sections", "10")
|
||||
if code != 2 || stdout != "" || f.provider.callCount() != 0 || !strings.Contains(stderr, "target_sections") {
|
||||
t.Fatalf("infeasible target: code=%d stdout=%q stderr=%q calls=%d", code, stdout, stderr, f.provider.callCount())
|
||||
}
|
||||
if _, err := os.Stat(f.output); !os.IsNotExist(err) {
|
||||
t.Fatalf("unexpected transcript output: %v", err)
|
||||
}
|
||||
if document := f.errors(t); document.Status != reporting.StatusFailed {
|
||||
t.Fatalf("report status: %+v", document)
|
||||
}
|
||||
}
|
||||
|
||||
func TestSubprocessOutputPermissionsHonorUmask(t *testing.T) {
|
||||
for _, mask := range []string{"0077", "0022"} {
|
||||
t.Run(mask, func(t *testing.T) {
|
||||
|
||||
Reference in New Issue
Block a user