Author: bernhard
Date: Sun Nov 6 12:41:35 2005
New Revision: 9813
Modified:
trunk/t/examples/pir.t
Log:
Give test 10 of pir.t a better chance of working on Win32.
Modified: trunk/t/examples/pir.t
==============================================================================
--- trunk/t/examples/pir.t (original)
+++ trunk/t/examples/pir.t Sun Nov 6 12:41:35 2005
@@ -220,11 +220,16 @@ while ( my ( $example, $expected ) = eac
# readline.pir expects something on standard input
{
- my $readline_fn = "examples$PConfig{slash}pir$PConfig{slash}readline.pir";
+ my $readline_pir_fn =
"examples$PConfig{slash}pir$PConfig{slash}readline.pir";
+ my $readline_tmp_fn = "test_readline.tmp";
+ open( my $tmp, '>', $readline_tmp_fn );
+ print $tmp "first line\n\nlast line\n";
+ close $tmp;
my $expected = << 'END_EXPECTED';
-# This line will be printed by ./parrot examples/pir/readline.t
+first line
END_EXPECTED
- my $out = `$PARROT $readline_fn < $readline_fn`;
- is( $out, $expected,, 'print untill first empty line' );
+ my $out = `$PARROT $readline_pir_fn < $readline_tmp_fn`;
+ is( $out, $expected, 'print until first empty line' );
+ unlink( $readline_tmp_fn );
}