mirror of
https://github.com/yudai/gotty.git
synced 2026-01-24 10:16:10 +01:00
Make client request base64 encoding
This makes gotty-client still work.
This commit is contained in:
parent
1eed97f0f8
commit
dd3603c341
8 changed files with 42 additions and 37 deletions
|
|
@ -98,8 +98,8 @@ func TestWriteFromFrontend(t *testing.T) {
|
|||
checkNextMsgType(t, mMaster.gottyToMasterReader, SetWindowTitle)
|
||||
checkNextMsgType(t, mMaster.gottyToMasterReader, SetBufferSize)
|
||||
|
||||
// simulate input from frontend... ("hello" in base64)
|
||||
message := []byte("1aGVsbG8=\n") // line buffered canonical mode
|
||||
// simulate input from frontend...
|
||||
message := []byte("1hello\n") // line buffered canonical mode
|
||||
mMaster.masterToGottyWriter.Write(message)
|
||||
|
||||
// ...and make sure it makes it through to the slave intact
|
||||
|
|
@ -108,7 +108,7 @@ func TestWriteFromFrontend(t *testing.T) {
|
|||
if err != nil {
|
||||
t.Fatalf("Unexpected error from Write(): %s", err)
|
||||
}
|
||||
if !bytes.Equal(readBuf[:n], []byte("hello")) {
|
||||
if !bytes.Equal(readBuf[:n], message[1:]) {
|
||||
t.Fatalf("Unexpected message received: `%s`", readBuf[:n])
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue