make max output settings
Some checks failed
go-test / go test (push) Successful in 12s
Release / Build & publish (push) Failing after 1m7s

This commit is contained in:
2026-06-10 11:37:59 +03:00
parent b44cccf8d1
commit 8cf2584ce5
4 changed files with 39 additions and 2 deletions

View File

@@ -488,8 +488,12 @@ func (r *Runner) runTest(t *dsl.Test) *TestResult {
cmd.Stdin = strings.NewReader(*t.Stdin)
}
stdout := &cappedBuffer{limit: MaxOutputBytes}
stderr := &cappedBuffer{limit: MaxOutputBytes}
outLimit := MaxOutputBytes
if r.file.MaxOutput > 0 {
outLimit = int(r.file.MaxOutput)
}
stdout := &cappedBuffer{limit: outLimit}
stderr := &cappedBuffer{limit: outLimit}
cmd.Stdout = stdout
cmd.Stderr = stderr