From 8e6730d0c0f3db2c89a0dad07f67082c7eb88321 Mon Sep 17 00:00:00 2001 From: Slaven Rezic Date: Sat, 28 Dec 2013 10:55:28 +0100 Subject: [PATCH] fix pty.t test failures on linux --- t/pty.t | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/t/pty.t b/t/pty.t index 42591a4..6d99b21 100644 --- a/t/pty.t +++ b/t/pty.t @@ -141,14 +141,14 @@ $fd_map = _map_fds; $h = start \@echoer, \$in, '>pty>', \$out; $in = "hello\n"; $? = 0; -pump $h until $out =~ /hello/; +pump $h until $out =~ /hello\r?\n/; ## We assume that the slave's write()s are atomic $exp = qr/^(?:hello\r?\n){2}(?!\n)$/i; $out =~ $exp ? ok( 1 ) : is( $out, $exp ); is( $in, '' ); $in = "world\n"; $? = 0; -pump $h until $out =~ /world/; +pump $h until $out =~ /world\r?\n/; $exp = qr/^(?:hello\r?\n){2}(?:world\r?\n){2}(?!\n)$/i; $out =~ $exp ? ok( 1 ) : is( $out, $exp ); is( $in, '' ); @@ -165,7 +165,7 @@ $fd_map = _map_fds; $h = start \@echoer, \$in, '>pty>', \$out, '2>', \$err; $in = "hello\n"; $? = 0; -pump $h until $out =~ /hello/ && $err =~ /HELLO/; +pump $h until $out =~ /hello\r?\n/ && $err =~ /HELLO/; $exp = qr/^hello\r?\n(?!\n)$/; $out =~ $exp ? ok( 1 ) : is( $out, $exp ); $exp = qr/^HELLO\n(?!\n)$/; @@ -173,7 +173,7 @@ $err =~ $exp ? ok( 1 ) : is( $err, $exp ); is( $in, '' ); $in = "world\n"; $? = 0; -pump $h until $out =~ /world/ && $err =~ /WORLD/; +pump $h until $out =~ /world\r?\n/ && $err =~ /WORLD/; $exp = qr/^hello\r?\nworld\r?\n(?!\n)$/; $out =~ $exp ? ok( 1 ) : is( $out, $exp ); $exp = qr/^HELLO\nWORLD\n(?!\n)$/ , @@ -192,14 +192,14 @@ $fd_map = _map_fds; $h = start \@echoer, 'pty>', \$out; $in = "hello\n"; $? = 0; -pump $h until $out =~ /hello.*hello.*hello/is; +pump $h until $out =~ /hello.*hello.*hello\r?\n/is; ## We assume that the slave's write()s are atomic $exp = qr/^(?:hello\r?\n){3}(?!\n)$/i; $out =~ $exp ? ok( 1 ) : is( $out, $exp ); is( $in, '' ); $in = "world\n"; $? = 0; -pump $h until $out =~ /world.*world.*world/is; +pump $h until $out =~ /world.*world.*world\r?\n/is; $exp = qr/^(?:hello\r?\n){3}(?:world\r?\n){3}(?!\n)$/i; $out =~ $exp ? ok( 1 ) : is( $out, $exp ); is( $in, '' ); -- 1.7.10.4