This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Test for the qr// construct
[perl5.git] / t / op / qr.t
CommitLineData
9bc340e7
AB
1#!./perl -w
2
3BEGIN {
4 chdir 't' if -d 't';
5 @INC = '../lib';
6 require './test.pl';
7}
8
9plan tests => 2;
10
11my $rx = qr//;
12
13is(ref $rx, "Regexp", "qr// blessed into `Regexp' by default");
14
15#
16# DESTROY doesn't do anything in the case of qr// except make sure
17# that lookups for it don't end up in AUTOLOAD lookups. But make sure
18# it's there anyway.
19#
20ok($rx->can("DESTROY"), "DESTROY method defined for Regexp");