thiagu_mvt has asked for the wisdom of the Perl Monks concerning the following question:
When we wrote testcase that has forking inside results are printed twice. Can we correct this ?
Thiagu
[host1]$ cat test.pl use Test::More tests => 2; sub for{ my $pid = fork; if($pid == 0 ){ }else{} waitpid($pid,0); } $a = "hi"; ok ("hi" eq $a); ok("1" eq &for());
Thanks,[host1]$ perl test.pl 1..2 ok 1 not ok 2 # Failed test (test.pl at line 14) not ok 2 # Failed test (test.pl at line 14) # Looks like you failed 1 tests of 2.
Thiagu
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Results printing multiple times when testcase with fork using Test::more module
by shmem (Chancellor) on May 20, 2009 at 14:12 UTC | |
by thiagu_mvt (Sexton) on May 21, 2009 at 10:51 UTC | |
Re: Results printing multiple times when testcase with fork using Test::more module
by ELISHEVA (Prior) on May 20, 2009 at 18:57 UTC | |
by thiagu_mvt (Sexton) on May 21, 2009 at 11:41 UTC |
Back to
Seekers of Perl Wisdom