summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfukachan <fukachan>2002-02-13 12:30:35 +0000
committerfukachan <fukachan>2002-02-13 12:30:35 +0000
commita1a40616aedc0b2b1d3afb3cfe41cd3670397af6 (patch)
tree041968dddccc21e59ad0c6fc82e2202d19832ea1
parent7c9c065371882df6393db45d8b4cb5dbe22984c2 (diff)
downloadfml8-a1a40616aedc0b2b1d3afb3cfe41cd3670397af6.tar.gz
fml8-a1a40616aedc0b2b1d3afb3cfe41cd3670397af6.tar.bz2
fml8-a1a40616aedc0b2b1d3afb3cfe41cd3670397af6.zip
read test of virtual_maps (only file: now)
-rwxr-xr-xregress/base/virtual_maps.pl35
1 files changed, 35 insertions, 0 deletions
diff --git a/regress/base/virtual_maps.pl b/regress/base/virtual_maps.pl
new file mode 100755
index 00000000..14ff6056
--- /dev/null
+++ b/regress/base/virtual_maps.pl
@@ -0,0 +1,35 @@
+#!/usr/bin/env perl
+#
+# $FML$
+#
+
+if (-f "/etc/postfix/virtual") {
+ print "IO::Adapter::find() for /etc/postfix/virtual\n";
+
+ use IO::Adapter;
+
+ my $map = new IO::Adapter ("file:/etc/postfix/virtual");
+
+ if (defined $map) {
+ $map->open;
+
+ print "# want is not specified.\n";
+ my $r = $map->find('^nuinui');
+ print $r, "\n";
+
+ print "# want = key,value\n";
+ my $r = $map->find('^nuinui', { want => 'key,value' } );
+ print $r, "\n";
+
+ print "# want = key\n";
+ my $r = $map->find('^nuinui', { want => 'key' } );
+ print $r, "\n";
+
+ }
+ else {
+ use Carp;
+ croak("undefined");
+ }
+}
+
+exit 0;