From 6a4647a3a8b62032c9f9f86043d233d69786c400 Mon Sep 17 00:00:00 2001 From: Jarkko Hietaniemi Date: Wed, 2 Jul 2003 08:40:36 +0000 Subject: FreeBSD $0 dance. p4raw-id: //depot/perl@19925 --- t/op/magic.t | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 't/op/magic.t') 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; -- cgit v1.2.1