From ca52ecc150b3e274ca09a5b30d71e1ec3c2fea1d Mon Sep 17 00:00:00 2001 From: Zoffix Znet Date: Thu, 14 Jul 2016 08:27:51 -0400 Subject: [PATCH] [TODO FUDGE] LAST phaser gets triggered when using -n command line switch RT#128398 --- S29-os/system.t | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/S29-os/system.t b/S29-os/system.t index 6335ed3dc7..72d3cc88ed 100644 --- a/S29-os/system.t +++ b/S29-os/system.t @@ -8,7 +8,7 @@ use Test::Util; # L # system is renamed to run, so link there. -plan 30; +plan 31; my $res; @@ -83,6 +83,22 @@ throws-like { shell("program_that_does_not_exist_ignore_errors_please.exe") }, } } +# RT #128398 +{ + my $p = Proc::Async.new: :w, $*EXECUTABLE, "-ne", + Q!last if /2/; .say; LAST { say "test worked" }!; + + my $stdout = ''; + $p.stdout.tap: { $stdout ~= $^a }; + my $prom = $p.start; + await $p.write: "1\n2\n3\n4\n".encode; + await $prom; + + #?rakudo.moar todo 'RT 128398' + is $stdout, "1\ntest worked\n", + 'LAST phaser gets triggered when using -n command line switch'; +} + # all these tests feel like bogus, what are we testing here??? # note: is_run fails after these tests because we are no longer in the right dir chdir "t";