This commit is contained in:
Mike Schwörer 2023-02-09 15:01:54 +01:00
parent b0b43de8ca
commit 26dd16d021
Signed by: Mikescher
GPG Key ID: D3C7172E0A70F8CF

View File

@ -224,3 +224,22 @@ func TestListener(t *testing.T) {
panic(err)
}
}
func TestLongStdout(t *testing.T) {
res1, err := Runner("python").
Arg("-c").
Arg("import sys; import time; print(\"1234\" * 10000 + \"\\n\"); print(\"1234\" * 10000 + \"\\n\"); print(\"1234\" * 10000 + \"\\n\");").
Timeout(100 * time.Millisecond).
Run()
if err != nil {
t.Errorf("%v", err)
}
if res1.StdErr != "" {
t.Errorf("res1.StdErr == '%v'", res1.StdErr)
}
if len(res1.StdOut) != 120006 {
t.Errorf("len(res1.StdOut) == '%v'", len(res1.StdOut))
}
}