Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 992b583 commit d11a431Copy full SHA for d11a431
pty/ptytest/ptytest_test.go
@@ -1,8 +1,11 @@
1
package ptytest_test
2
3
import (
4
+ "os/exec"
5
"testing"
6
7
+ "github.com/stretchr/testify/require"
8
+
9
"github.com/coder/coder/pty/ptytest"
10
)
11
@@ -15,4 +18,13 @@ func TestPtytest(t *testing.T) {
15
18
pty.ExpectMatch("write")
16
19
pty.WriteLine("read")
17
20
})
21
+ // nolint:paralleltest
22
+ t.Run("Do not hang on Intel macOS", func(t *testing.T) {
23
+ cmd := exec.Command("sh", "-c", "for i in $(seq 1 1000); do echo $i; done")
24
+ pty := ptytest.New(t)
25
+ cmd.Stdin = pty.Input()
26
+ cmd.Stdout = pty.Output()
27
+ err := cmd.Run()
28
+ require.NoError(t, err)
29
+ })
30
}
0 commit comments