Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit7a015af

Browse files
committed
Add test for SSH_PTY env var
1 parentd63d640 commit7a015af

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)

[8]ページ先頭

©2009-2025 Movatter.jp