From 9bc340e7075cf676a06e1e977596de553dbf79fb Mon Sep 17 00:00:00 2001 From: =?utf8?q?=C3=86var=20Arnfj=C3=B6r=C3=B0=20Bjarmason?= Date: Mon, 9 Apr 2007 20:36:58 +0000 Subject: [PATCH] =?utf8?q?Test=20for=20the=20qr//=20construct=20From:=20"?= =?utf8?q?=C3=86var=20Arnfj=C3=B6r=C3=B0=20Bjarmason"=20?= =?utf8?q?=20Message-ID:=20<51dd1af80704091336q335f0584o602b5e245bc210fe@m?= =?utf8?q?ail.gmail.com>?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Includes add to the MANIFEST p4raw-id: //depot/perl@30880 --- MANIFEST | 1 + t/op/qr.t | 20 ++++++++++++++++++++ 2 files changed, 21 insertions(+) create mode 100644 t/op/qr.t 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"); -- 2.7.4