Skip to content

Commit 5fc1d41

Browse files
committed
Add test for SSH_PTY env var
1 parent 22a24db commit 5fc1d41

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

pty/start_other_test.go

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
//go:build !windows
2-
// +build !windows
32

43
package pty_test
54

@@ -40,4 +39,12 @@ func TestStart(t *testing.T) {
4039
require.True(t, xerrors.As(err, &exitErr))
4140
assert.NotEqual(t, 0, exitErr.ExitCode())
4241
})
42+
43+
t.Run("SSH_PTY", func(t *testing.T) {
44+
t.Parallel()
45+
pty, ps := ptytest.Start(t, exec.Command("env"))
46+
pty.ExpectMatch("SSH_PTY=/dev/pts/")
47+
err := ps.Wait()
48+
require.NoError(t, err)
49+
})
4350
}

0 commit comments

Comments
 (0)