test: Refactor ptytest to use contexts and less duplication (#5740)

This commit is contained in:
Mathias Fredriksson
2023-01-17 16:02:38 +02:00
committed by GitHub
parent 77e71f3ca4
commit 145d101512
4 changed files with 136 additions and 136 deletions
+1 -1
View File
@@ -477,7 +477,7 @@ Expire-Date: 0
// Wait for the prompt or any output really to indicate the command has
// started and accepting input on stdin.
_ = pty.ReadRune(ctx)
_ = pty.Peek(ctx, 1)
pty.WriteLine("echo hello 'world'")
pty.ExpectMatch("hello world")