Skip to content

Commit c2b2d0f

Browse files
committed
SendLine sends just newline character
1 parent 8ffbfce commit c2b2d0f

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

expect/console.go

+5
Original file line numberDiff line numberDiff line change
@@ -288,6 +288,11 @@ func (c *Console) Send(s string) (int, error) {
288288

289289
// SendLine writes string s to Console's tty with a trailing newline.
290290
func (c *Console) SendLine(s string) (int, error) {
291+
return c.Send(fmt.Sprintf("%s\n", s))
292+
}
293+
294+
// SendOSLine writes string s to Console's tty with a trailing newline separator native to the base OS.
295+
func (c *Console) SendOSLine(s string) (int, error) {
291296
return c.Send(fmt.Sprintf("%s%s", s, osutils.LineSep))
292297
}
293298

0 commit comments

Comments
 (0)