summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfukachan <fukachan>2001-08-24 11:55:55 +0000
committerfukachan <fukachan>2001-08-24 11:55:55 +0000
commit926daffc7e256b4e5ea5281e479c727d49fb4194 (patch)
tree61c37175c5d43fd22aecca049118148685a5d3da
parenta7a839ee18f1b3ebcae720d92222925c3825d449 (diff)
downloadfml8-926daffc7e256b4e5ea5281e479c727d49fb4194.tar.gz
fml8-926daffc7e256b4e5ea5281e479c727d49fb4194.tar.bz2
fml8-926daffc7e256b4e5ea5281e479c727d49fb4194.zip
add&enable FML::Config {+,-}= overload test tools
-rw-r--r--regress/cf/Makefile7
-rwxr-xr-xregress/cf/test.overload.pl34
-rw-r--r--regress/simulation/Makefile3
3 files changed, 43 insertions, 1 deletions
diff --git a/regress/cf/Makefile b/regress/cf/Makefile
new file mode 100644
index 00000000..b67844cb
--- /dev/null
+++ b/regress/cf/Makefile
@@ -0,0 +1,7 @@
+#
+# $FML$
+#
+
+test:
+ @ echo "* FML::Config overload test:"
+ @ perl ../cf/test.overload.pl ../cf/default.cf ../cf/1.cf
diff --git a/regress/cf/test.overload.pl b/regress/cf/test.overload.pl
new file mode 100755
index 00000000..36bec981
--- /dev/null
+++ b/regress/cf/test.overload.pl
@@ -0,0 +1,34 @@
+#!/usr/local/bin/perl
+#
+# $FML: mime.pl,v 1.6 2001/06/17 09:00:30 fukachan Exp $
+#
+
+use strict;
+use Carp;
+use lib qw(../../fml/lib ../../cpan/lib);
+use FML::Config;
+
+my $config = new FML::Config;
+my @prev_x = ();
+my $i = 0;
+
+for my $f (@ARGV) {
+ $config->overload($f);
+
+ my $x = $config->{ 'x' };
+ print STDERR " x = $x (loaded $f)\n";
+
+ # save values
+ $prev_x[ $i ] = $x; $i++;
+}
+
+$prev_x[ 0 ] =~ s/xxx/yyy/;
+
+if ($prev_x[ 0 ] eq $prev_x[ 1]) {
+ print STDERR "ok\n";
+}
+else {
+ print STDERR "fail\n";
+}
+
+1;
diff --git a/regress/simulation/Makefile b/regress/simulation/Makefile
index 4085eb89..eb3cad31 100644
--- a/regress/simulation/Makefile
+++ b/regress/simulation/Makefile
@@ -1,5 +1,5 @@
#
-# $FML: Makefile,v 1.40 2001/08/05 03:28:47 fukachan Exp $
+# $FML: Makefile,v 1.41 2001/08/05 13:09:00 fukachan Exp $
#
all: link
@@ -67,6 +67,7 @@ test:
@ apply perl IO/t/*pl
@ test -d /tmp/fml5 || mkdir /tmp/fml5
@ make -f ../base/Makefile
+ @ (cd ../cf; make test)
@ echo "* errormails"
@ (cd ../errormails; make check)