Browse files

#39928: [PATCH] [Win32] Remove Quotes for lazy-k calc.t on Windows

Thanks to Ron Blaschke.


git-svn-id: http://svn.perl.org/parrot/trunk@13555 d31e2699-5ff4-0310-a27c-f18f2fbe73fe
  • Loading branch information...
1 parent f4f6c00 commit 8f8217b30658b0390db684601ac10d9c13950fe1 bernhard committed Jul 25, 2006
Showing with 11 additions and 1 deletion.
  1. +11 −1 t/calc.t
View
12 t/calc.t
@@ -30,11 +30,21 @@ use Test::More tests => 1;
use Parrot::Config;
use File::Spec();
+my $is_win32 = $^O eq 'MSWin32';
+
my $parrot = File::Spec->catfile( File::Spec->updir(), $PConfig{test_prog} );
my $lazy_k = $parrot . q{ } . File::Spec->catfile( 'lazy-k', 'lazy.pir' );
my $calc_lazy = File::Spec->catfile( 'lazy-k', 'calc.lazy' );
# XXX This does not look portable.
-my $cmd = qq{echo '1+2*3' | $lazy_k $calc_lazy};
+my $cmd;
+if ($is_win32) {
+ # Don't quote the string on Windows, it is passed on literally
+ $cmd = qq{echo 1+2*3 | $lazy_k $calc_lazy};
+}
+else {
+ $cmd = qq{echo '1+2*3' | $lazy_k $calc_lazy};
+}
+
# die Dumper( $cmd );
is( `$cmd`, "7\n", 'calc.lazy' );

0 comments on commit 8f8217b

Please sign in to comment.