-#!./perl
+#!./perl -w
#
# Tests to make sure the regexp engine doesn't run into limits too soon.
#
BEGIN {
chdir 't' if -d 't';
@INC = '../lib';
+ require './test.pl';
}
-print "1..13\n";
+use strict;
my $email = qr {
(?(DEFINE)
(?&address)
}x;
-
run_tests() unless caller;
sub run_tests {
- my $count = 0;
-
- $| = 1;
# rewinding DATA is necessary with PERLIO=stdio when this
# test is run from another thread
seek *DATA, 0, 0;
while (<DATA>) {
chomp;
next if /^#/;
- print /^$email$/ ? "ok " : "not ok ", ++ $count, "\n";
+ like($_, qr/^$email$/, $_);
}
+
+ done_testing();
}
+1; # Because reg_email_thr.t will (indirectly) require this script.
+
#
# Acme::MetaSyntactic ++
#