Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixed/finished basic pty support, added an example, and included tests #25

Merged
merged 8 commits into from
Feb 16, 2017
Prev Previous commit
Next Next commit
session_test: fixing pty resize test
Signed-off-by: Jeff Lindsay <progrium@gmail.com>
  • Loading branch information
progrium committed Feb 15, 2017
commit d18a9b5fe88c645f36262e2e2d3caf91c6974b05
6 changes: 5 additions & 1 deletion session_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -242,13 +242,17 @@ func TestPtyResize(t *testing.T) {
if err := session.Shell(); err != nil {
t.Fatalf("expected nil but got %v", err)
}
gotWinch := <-winches
if gotWinch != winch0 {
t.Fatalf("expected window %#v but got %#v", winch0, gotWinch)
}
// winch1
winchMsg := struct{ w, h uint32 }{uint32(winch1.Width), uint32(winch1.Height)}
ok, err := session.SendRequest("window-change", true, gossh.Marshal(&winchMsg))
if err == nil && !ok {
t.Fatalf("unexpected error or bad reply on send request")
}
gotWinch := <-winches
gotWinch = <-winches
if gotWinch != winch1 {
t.Fatalf("expected window %#v but got %#v", winch1, gotWinch)
}
Expand Down