From: Jarkko Hietaniemi <jhi@iki.fi>
Date: Fri, 23 Nov 2001 20:09:36 +0000 (+0000)
Subject: Here are the right helper files.
X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=255c126390aba0ff9fa68e2a67107e2b25645dfc;p=p5sagit%2Fp5-mst-13.2.git

Here are the right helper files.

p4raw-id: //depot/perl@13227
---

diff --git a/MANIFEST b/MANIFEST
index dbe9c51..2f61242 100644
--- a/MANIFEST
+++ b/MANIFEST
@@ -2080,10 +2080,10 @@ t/lib/dprof/test6_t		Perl code profiler tests
 t/lib/dprof/test6_v		Perl code profiler tests
 t/lib/dprof/V.pm		Perl code profiler tests
 t/lib/filter-util.pl		See if Filter::Util::Call works
-t/lib/Filter/Simple/ExportTest.pm		Helper file for lib/Filter/Simple/t/export.t
-t/lib/Filter/Simple/FilterOnlyTest.pm		Helper file for lib/Filter/Simple/t/filter_only.t
-t/lib/Filter/Simple/FilterTest.pm		Helper file for lib/Filter/Simple/t/filter.t
-t/lib/Filter/Simple/ImportTest.pm		Helper file for lib/Filter/Simple/t/import.t
+t/lib/Filter/Simple/ExportTest.pm	Helper file for Filter::Simple tests 
+t/lib/Filter/Simple/FilterOnlyTest.pm	Helper file for Filter::Simple tests
+t/lib/Filter/Simple/FilterTest.pm	Helper file for Filter::Simple tests
+t/lib/Filter/Simple/ImportTest.pm	Helper file for Filter::Simple tests
 t/lib/h2ph.h			Test header file for h2ph
 t/lib/h2ph.pht			Generated output from h2ph.h by h2ph, for comparison
 t/lib/locale/latin1		Part of locale.t in Latin 1
diff --git a/t/lib/Filter/Simple/ExportTest.pm b/t/lib/Filter/Simple/ExportTest.pm
new file mode 100755
index 0000000..d6da629
--- /dev/null
+++ b/t/lib/Filter/Simple/ExportTest.pm
@@ -0,0 +1,12 @@
+package ExportTest;
+
+use Filter::Simple;
+use base Exporter;
+
+@EXPORT_OK = qw(ok);
+
+FILTER { s/not// };
+
+sub ok { print "ok @_\n" }
+
+1;
diff --git a/t/lib/Filter/Simple/FilterOnlyTest.pm b/t/lib/Filter/Simple/FilterOnlyTest.pm
new file mode 100644
index 0000000..856e79d
--- /dev/null
+++ b/t/lib/Filter/Simple/FilterOnlyTest.pm
@@ -0,0 +1,11 @@
+package FilterOnlyTest;
+
+use Filter::Simple;
+
+FILTER_ONLY
+	string => sub {
+		my $class = shift;
+		while (my($pat, $str) = splice @_, 0, 2) {
+			s/$pat/$str/g;
+		}
+	};
diff --git a/t/lib/Filter/Simple/FilterTest.pm b/t/lib/Filter/Simple/FilterTest.pm
new file mode 100644
index 0000000..c49e280
--- /dev/null
+++ b/t/lib/Filter/Simple/FilterTest.pm
@@ -0,0 +1,12 @@
+package FilterTest;
+
+use Filter::Simple;
+
+FILTER {
+	my $class = shift;
+	while (my($pat, $str) = splice @_, 0, 2) {
+		s/$pat/$str/g;
+	}
+};
+
+1;
diff --git a/t/lib/Filter/Simple/ImportTest.pm b/t/lib/Filter/Simple/ImportTest.pm
new file mode 100755
index 0000000..6646a36
--- /dev/null
+++ b/t/lib/Filter/Simple/ImportTest.pm
@@ -0,0 +1,19 @@
+package ImportTest;
+
+use base 'Exporter';
+@EXPORT = qw(say);
+
+sub say { print @_ }
+
+use Filter::Simple;
+
+sub import {
+	my $class = shift;
+	print "ok $_\n" foreach @_;
+	__PACKAGE__->export_to_level(1,$class);
+}
+
+FILTER { s/not // };
+
+
+1;