summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2001-05-01 23:18:02 +0000
committerJarkko Hietaniemi <jhi@iki.fi>2001-05-01 23:18:02 +0000
commitfbe2c49e2ed4cda410ff6c2bd9a69a7fb24c4c52 (patch)
tree113f0ae2d83d43282ad589bb345ad33973a7ad85 /t
parentee0b771877836a9ae06a1e11424d772169d82f7d (diff)
downloadperl-fbe2c49e2ed4cda410ff6c2bd9a69a7fb24c4c52.tar.gz
Update to Filter::Simple 0.60, create a test for it.
p4raw-id: //depot/perl@9942
Diffstat (limited to 't')
-rw-r--r--t/lib/filter-simple.t27
1 files changed, 27 insertions, 0 deletions
diff --git a/t/lib/filter-simple.t b/t/lib/filter-simple.t
new file mode 100644
index 0000000000..3fb32701c5
--- /dev/null
+++ b/t/lib/filter-simple.t
@@ -0,0 +1,27 @@
+#!./perl
+
+BEGIN {
+ chdir('t') if -d 't';
+ @INC = 'lib';
+}
+
+print "1..6\n";
+
+use MyFilter qr/not ok/ => "ok", fail => "ok";
+
+sub fail { print "fail ", $_[0], "\n" }
+
+print "not ok 1\n";
+print "fail 2\n";
+
+fail(3);
+&fail(4);
+
+print "not " unless "whatnot okapi" eq "whatokapi";
+print "ok 5\n";
+
+no MyFilter;
+
+print "not " unless "not ok" =~ /^not /;
+print "ok 6\n";
+