Ticket #1360: smoke_languages.pl.path.problem.2.patch

File smoke_languages.pl.path.problem.2.patch, 8.1 KB (added by jpaton, 5 years ago)

quotes around command variable in backticks

  • smoke_languages.pl

     
    6868my $FH; 
    6969my $parrot = catfile($pwd, $bindir, 'parrot'); 
    7070 
    71 $out = `$parrot -V`; 
     71$out = `"$parrot" -V`; 
    7272$out =~ m/version (\S+) built/; 
    7373my $version = $1; 
    7474 
     
    9292$exe = catfile($pwd, $bindir, 'parrot-abc'); 
    9393$exe .= '.exe' if ($^O eq 'MSWin32'); 
    9494$exe = "$parrot abc.pbc" unless (-e $exe); 
    95 $out = `$exe $filename`; 
     95$out = `"$exe" $filename`; 
    9696ok($out eq "3\n", "check abc"); 
    9797unlink($filename); 
    9898} 
     
    120120$exe = catfile($pwd, $bindir, 'parrot-befunge'); 
    121121$exe .= '.exe' if ($^O eq 'MSWin32'); 
    122122$exe = "$parrot befunge.pbc" unless (-e $exe); 
    123 $out = `$exe $filename`; 
     123$out = `"$exe" $filename`; 
    124124ok($out eq "If you can see a 4 here ->4 <- then everything is ok!\n", "check befunge"); 
    125125unlink($filename); 
    126126} 
     
    165165$exe = catfile($pwd, $bindir, 'parrot-blizkost'); 
    166166$exe .= '.exe' if ($^O eq 'MSWin32'); 
    167167$exe = "$parrot perl5.pbc" unless (-e $exe); 
    168 $out = `$exe $filename`; 
     168$out = `"$exe" $filename`; 
    169169ok($out eq "Hello, World!\n" || $out eq "Hello, World!\r\n", "check blizkost"); 
    170170unlink($filename); 
    171171} 
     
    177177$exe = catfile($pwd, $bindir, 'parrot-cardinal'); 
    178178$exe .= '.exe' if ($^O eq 'MSWin32'); 
    179179$exe = "$parrot cardinal.pbc" unless (-e $exe); 
    180 $out = `$exe -e "print 'hello world';"`; 
     180$out = `"$exe" -e "print 'hello world';"`; 
    181181ok($out eq "hello world", "check cardinal"); 
    182182} 
    183183 
     
    193193$exe = catfile($pwd, $bindir, 'parrot-chitchat'); 
    194194$exe .= '.exe' if ($^O eq 'MSWin32'); 
    195195$exe = "$parrot chitchat.pbc" unless (-e $exe); 
    196 $out = `$exe $filename`; 
     196$out = `"$exe" $filename`; 
    197197ok($out eq "Hello, world!\n", "check chitchat"); 
    198198unlink($filename); 
    199199} 
     
    202202{ 
    203203skip(".NET", 1) unless (-d "$pwd/$langdir/dotnet"); 
    204204chdir("$pwd/$langdir/dotnet"); 
    205 $out = `$parrot dotnet/net2pbc.pbc`; 
     205$out = `"$parrot" dotnet/net2pbc.pbc`; 
    206206ok($out =~ /^Usage/, "check dotnet"); 
    207207} 
    208208 
     
    218218$exe = catfile($pwd, $bindir, 'parrot-js'); 
    219219$exe .= '.exe' if ($^O eq 'MSWin32'); 
    220220$exe = "$parrot js.pbc" unless (-e $exe); 
    221 $out = `$exe $filename`; 
     221$out = `"$exe" $filename`; 
    222222ok($out eq "Hello World from JS\n", "check ecmascript"); 
    223223unlink($filename); 
    224224} 
     
    235235$exe = catfile($pwd, $bindir, 'parrot-fun'); 
    236236$exe .= '.exe' if ($^O eq 'MSWin32'); 
    237237$exe = "$parrot fun.pbc" unless (-e $exe); 
    238 $out = `$exe $filename`; 
     238$out = `"$exe" $filename`; 
    239239ok($out eq "Hello World!\n", "check fun"); 
    240240unlink($filename); 
    241241} 
     
    252252$exe = catfile($pwd, $bindir, 'parrot-gil'); 
    253253$exe .= '.exe' if ($^O eq 'MSWin32'); 
    254254$exe = "$parrot gil.pbc" unless (-e $exe); 
    255 $out = `$exe $filename`; 
     255$out = `"$exe" $filename`; 
    256256ok($out eq "Hello, world!\n", "check gil"); 
    257257unlink($filename); 
    258258} 
     
    269269$exe = catfile($pwd, $bindir, 'parrot-hq9plus'); 
    270270$exe .= '.exe' if ($^O eq 'MSWin32'); 
    271271$exe = "$parrot hq9plus.pbc" unless (-e $exe); 
    272 $out = `$exe $filename`; 
     272$out = `"$exe" $filename`; 
    273273ok($out eq "Hello, world!\n", "check HQ9Plus"); 
    274274unlink($filename); 
    275275} 
     
    286286$exe = catfile($pwd, $bindir, 'parrot-lisp'); 
    287287$exe .= '.exe' if ($^O eq 'MSWin32'); 
    288288$exe = "$parrot lisp.pbc" unless (-e $exe); 
    289 $out = `$exe $filename`; 
     289$out = `"$exe" $filename`; 
    290290ok($out eq "Hello, World!\n", "check lisp"); 
    291291unlink($filename); 
    292292} 
     
    307307$exe = catfile($pwd, $bindir, 'parrot-lolcode'); 
    308308$exe .= '.exe' if ($^O eq 'MSWin32'); 
    309309$exe = "$parrot lolcode.pbc" unless (-e $exe); 
    310 $out = `$exe $filename`; 
     310$out = `"$exe" $filename`; 
    311311ok($out eq "HAI WORLD!\n", "check lolcode"); 
    312312unlink($filename); 
    313313} 
     
    319319$exe = catfile($pwd, $bindir, 'parrot-lua'); 
    320320$exe .= '.exe' if ($^O eq 'MSWin32'); 
    321321$exe = "$parrot lua.pbc" unless (-e $exe); 
    322 $out = `$exe -e "print(nil)"`; 
     322$out = `"$exe" -e "print(nil)"`; 
    323323ok($out eq "nil\n", "check lua"); 
    324324} 
    325325 
     
    346346$exe = catfile($pwd, $bindir, 'parrot-markdown'); 
    347347$exe .= '.exe' if ($^O eq 'MSWin32'); 
    348348$exe = "$parrot markdown.pbc" unless (-e $exe); 
    349 $out = `$exe $filename`; 
     349$out = `"$exe" $filename`; 
    350350ok($out eq "<p>Hello, World!</p>\n", "check markdown"); 
    351351unlink($filename); 
    352352} 
     
    363363$exe = catfile($pwd, $bindir, 'parrot-matrixy'); 
    364364$exe .= '.exe' if ($^O eq 'MSWin32'); 
    365365$exe = "$parrot matrixy.pbc" unless (-e $exe); 
    366 $out = `$exe $filename`; 
     366$out = `"$exe" $filename`; 
    367367ok($out eq "Hello, world!\n", "check matrixy"); 
    368368unlink($filename); 
    369369} 
     
    380380$exe = catfile($pwd, $bindir, 'parrot-apl'); 
    381381$exe .= '.exe' if ($^O eq 'MSWin32'); 
    382382$exe = "$parrot apl.pbc" unless (-e $exe); 
    383 $out = `$exe $filename`; 
     383$out = `"$exe" $filename`; 
    384384ok($out eq "Hello world!\n", "check Paraplegic"); 
    385385unlink($filename); 
    386386} 
     
    397397$exe = catfile($pwd, $bindir, 'parrot-pheme'); 
    398398$exe .= '.exe' if ($^O eq 'MSWin32'); 
    399399$exe = "$parrot pheme.pbc" unless (-e $exe); 
    400 $out = `$exe $filename`; 
     400$out = `"$exe" $filename`; 
    401401ok($out eq "Hello, World!\n", "check pheme"); 
    402402unlink($filename); 
    403403} 
     
    414414$exe = catfile($pwd, $bindir, 'parrot-pipp'); 
    415415$exe .= '.exe' if ($^O eq 'MSWin32'); 
    416416$exe = "$parrot pipp.pbc" unless (-e $exe); 
    417 $out = `$exe $filename`; 
     417$out = `"$exe" $filename`; 
    418418ok($out eq "Hello, World!\n", "check pipp"); 
    419419unlink($filename); 
    420420} 
     
    436436$exe = catfile($pwd, $bindir, 'parrot-porcupine'); 
    437437$exe .= '.exe' if ($^O eq 'MSWin32'); 
    438438$exe = "$parrot porcupine.pbc" unless (-e $exe); 
    439 $out = `$exe $filename`; 
     439$out = `"$exe" $filename`; 
    440440ok($out eq "Hello, world!\n", "check porcupine"); 
    441441unlink($filename); 
    442442} 
     
    453453$exe = catfile($pwd, $bindir, 'parrot-primitivearc'); 
    454454$exe .= '.exe' if ($^O eq 'MSWin32'); 
    455455$exe = "$parrot primitivearc.pbc" unless (-e $exe); 
    456 $out = `$exe $filename`; 
     456$out = `"$exe" $filename`; 
    457457ok($out eq "Hello, world!\n\n", "check primitivearc"); 
    458458unlink($filename); 
    459459} 
     
    470470$exe = catfile($pwd, $bindir, 'parrot-punie'); 
    471471$exe .= '.exe' if ($^O eq 'MSWin32'); 
    472472$exe = "$parrot punie.pbc" unless (-e $exe); 
    473 $out = `$exe $filename`; 
     473$out = `"$exe" $filename`; 
    474474ok($out eq "Hello, World!", "check punie"); 
    475475unlink($filename); 
    476476} 
     
    487487$exe = catfile($pwd, $bindir, 'parrot-pynie'); 
    488488$exe .= '.exe' if ($^O eq 'MSWin32'); 
    489489$exe = "$parrot pynie.pbc" unless (-e $exe); 
    490 $out = `$exe $filename`; 
     490$out = `"$exe" $filename`; 
    491491ok($out eq "Hello, World!\n", "check pynie"); 
    492492unlink($filename); 
    493493} 
     
    499499$exe = catfile($pwd, $bindir, 'perl6'); 
    500500$exe .= '.exe' if ($^O eq 'MSWin32'); 
    501501$exe = "$parrot perl6.pbc" unless (-e $exe); 
    502 $out = `$exe -e "say 'hello world'"`; 
     502$out = `"$exe" -e "say 'hello world'"`; 
    503503ok($out eq "hello world\n", "check rakudo"); 
    504504} 
    505505 
     
    606606$exe = catfile($pwd, $bindir, 'parrot-shakespeare'); 
    607607$exe .= '.exe' if ($^O eq 'MSWin32'); 
    608608$exe = "$parrot shakespeare.pbc" unless (-e $exe); 
    609 $out = `$exe $filename`; 
     609$out = `"$exe" $filename`; 
    610610ok($out eq "Hello World!\n", "check shakespeare"); 
    611611unlink($filename); 
    612612} 
     
    623623$exe = catfile($pwd, $bindir, 'parrot-steme'); 
    624624$exe .= '.exe' if ($^O eq 'MSWin32'); 
    625625$exe = "$parrot steme.pbc" unless (-e $exe); 
    626 $out = `$exe $filename`; 
     626$out = `"$exe" $filename`; 
    627627ok($out eq "Hello, World!\n", "check steme"); 
    628628unlink($filename); 
    629629} 
     
    640640$exe = catfile($pwd, $bindir, 'parrot-squaak'); 
    641641$exe .= '.exe' if ($^O eq 'MSWin32'); 
    642642$exe = "$parrot squaak.pbc" unless (-e $exe); 
    643 $out = `$exe $filename`; 
     643$out = `"$exe" $filename`; 
    644644ok($out eq "Hello, World!\n", "check squaak"); 
    645645unlink($filename); 
    646646} 
     
    660660$exe = catfile($pwd, $bindir, 'parrot-unl'); 
    661661$exe .= '.exe' if ($^O eq 'MSWin32'); 
    662662$exe = "$parrot unl.pbc" unless (-e $exe); 
    663 $out = `$exe $filename`; 
     663$out = `"$exe" $filename`; 
    664664ok($out eq "Hello world\n", "check unlambda"); 
    665665unlink($filename); 
    666666} 
     
    685685$exe = catfile($pwd, $bindir, 'parrot-wmlsi'); 
    686686$exe .= '.exe' if ($^O eq 'MSWin32'); 
    687687$exe = "$parrot wmlsi.pbc" unless (-e $exe); 
    688 $out = `$exe ${filename}c main`; 
     688$out = `"$exe" ${filename}c main`; 
    689689ok($out eq "Hello World!\n", "check wmlscript"); 
    690690unlink($filename); 
    691691unlink($filename . 'c');