From: Ævar Arnfjörð Bjarmason Date: Mon, 9 Apr 2007 20:36:58 +0000 (+0000) Subject: Test for the qr// construct X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=9bc340e7075cf676a06e1e977596de553dbf79fb;p=p5sagit%2Fp5-mst-13.2.git Test for the qr// construct From: "Ævar Arnfjörð Bjarmason" Message-ID: <51dd1af80704091336q335f0584o602b5e245bc210fe@mail.gmail.com> Includes add to the MANIFEST p4raw-id: //depot/perl@30880 --- diff --git a/MANIFEST b/MANIFEST index e5dbe45..12caf9e 100644 --- a/MANIFEST +++ b/MANIFEST @@ -3622,6 +3622,7 @@ t/op/push.t See if push and pop work t/op/pwent.t See if getpw*() functions work t/op/qq.t See if qq works t/op/qrstack.t See if qr expands the stack properly +t/op/qr.t See if qr works t/op/quotemeta.t See if quotemeta works t/op/rand.t See if rand works t/op/range.t See if .. works diff --git a/t/op/qr.t b/t/op/qr.t new file mode 100644 index 0000000..f8fc32f --- /dev/null +++ b/t/op/qr.t @@ -0,0 +1,20 @@ +#!./perl -w + +BEGIN { + chdir 't' if -d 't'; + @INC = '../lib'; + require './test.pl'; +} + +plan tests => 2; + +my $rx = qr//; + +is(ref $rx, "Regexp", "qr// blessed into `Regexp' by default"); + +# +# DESTROY doesn't do anything in the case of qr// except make sure +# that lookups for it don't end up in AUTOLOAD lookups. But make sure +# it's there anyway. +# +ok($rx->can("DESTROY"), "DESTROY method defined for Regexp");