File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -567,4 +567,15 @@ subtest 'process_args' => sub {
567567 is($p -> read_all_stdout(), " 0$/1$/2$/3$/ " , ' 2) Args given as arrayref.' );
568568};
569569
570+ subtest ' process in process' => sub {
571+ my $p = process(sub {
572+ is( process(execute => ' /usr/bin/true' )-> quirkiness(1)-> start()-> wait_stop()-> exit_status(), 0, ' process(execute) from process(code) -- retval check true' );
573+ is( process(execute => ' /usr/bin/false' )-> quirkiness(1)-> start()-> wait_stop()-> exit_status(), 1, ' process(execute) from process(code) -- retval check false' );
574+ is( process(sub { print ' sub-sub-process' })-> start()-> wait_stop()-> read_all_stdout, ' sub-sub-process' , ' process(code) works from process(code)' );
575+ print ' DONE' ;
576+ })-> start()-> wait_stop();
577+
578+ is ($p -> read_all_stdout(), ' DONE' , " Use ReadWriteProcess inside of ReadWriteProcess(code=>'')" );
579+ };
580+
570581done_testing;
You can’t perform that action at this time.
0 commit comments