summaryrefslogtreecommitdiff
path: root/t/op/magic.t
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2003-07-02 08:40:36 +0000
committerJarkko Hietaniemi <jhi@iki.fi>2003-07-02 08:40:36 +0000
commit6a4647a3a8b62032c9f9f86043d233d69786c400 (patch)
treee0c0537f9e3ecc47dbe3210575c8e4f95c3f2dac /t/op/magic.t
parente26ae24d00b4db2355949e2f0fcd0f6abaa857e3 (diff)
downloadperl-6a4647a3a8b62032c9f9f86043d233d69786c400.tar.gz
FreeBSD $0 dance.
p4raw-id: //depot/perl@19925
Diffstat (limited to 't/op/magic.t')
-rwxr-xr-xt/op/magic.t7
1 files changed, 5 insertions, 2 deletions
diff --git a/t/op/magic.t b/t/op/magic.t
index 1f982216aa..cee52cb9d5 100755
--- a/t/op/magic.t
+++ b/t/op/magic.t
@@ -300,8 +300,11 @@ else {
};
my $ps = $mydollarzero->("x");
ok(!$ps # we allow that something goes wrong with the ps command
- # FreeBSD cannot get rid of the trailing " (perl)".
- || $ps =~ /^x\b/,
+ || $ps eq 'x'
+ # FreeBSD cannot get rid of both the leading "perl :"
+ # and the trailing " (perl)": some FreeBSD versions
+ # can get rid of the first one.
+ || ($^O eq 'freebsd' && $ps =~ m/^(?:perl: )? x (?:\(perl\))?$/)
'altering $0 is effective (testing with `ps`)');
} else {
skip("\$0 check only on Linux and FreeBSD") for 0, 1;