diff options
| author | fukachan <fukachan> | 2006-01-24 14:14:49 +0000 |
|---|---|---|
| committer | fukachan <fukachan> | 2006-01-24 14:14:49 +0000 |
| commit | 5ff1140b29f3c7c91c667731f0016e109a4cc6c4 (patch) | |
| tree | e2fdc9ec0a2f91393266f71f898e8bfa818eac3d | |
| parent | 714bedd32683c23a8f263b53da3cdef6345622f3 (diff) | |
| download | fml8-5ff1140b29f3c7c91c667731f0016e109a4cc6c4.tar.gz fml8-5ff1140b29f3c7c91c667731f0016e109a4cc6c4.tar.bz2 fml8-5ff1140b29f3c7c91c667731f0016e109a4cc6c4.zip | |
overhal based on FML::Test::Utils.
| -rwxr-xr-x | regress/cf/read_only.pl | 14 | ||||
| -rwxr-xr-x | regress/cf/test.overload.pl | 15 |
2 files changed, 15 insertions, 14 deletions
diff --git a/regress/cf/read_only.pl b/regress/cf/read_only.pl index cf516a3d..1177e31b 100755 --- a/regress/cf/read_only.pl +++ b/regress/cf/read_only.pl @@ -1,6 +1,6 @@ #!/usr/bin/env perl # -# $FML: test.overload.pl,v 1.2 2002/04/18 14:18:09 fukachan Exp $ +# $FML: read_only.pl,v 1.1 2002/07/22 09:38:40 fukachan Exp $ # use strict; @@ -11,6 +11,9 @@ use FML::Config; my $debug = defined $ENV{'debug'} ? 1 : 0; my $value = 'a b c READ_ONLY($map)'; +use FML::Test::Utils; +my $tool = new FML::Test::Utils; +$tool->set_title("config.cf READ_ONLY"); # test 1: # READ_ONLY(x y) -> READ_ONLY(x) READ_ONLY(y) @@ -19,10 +22,10 @@ my $config = new FML::Config; $config->set( 'map', 'x y' ); $config->set( 'test', $value ); if ( $config->{ test } =~ /READ_ONLY\(x\)\s+READ_ONLY\(y\)/) { - print "ok\n"; + $tool->print_ok(); } else { - print "fail\n"; + $tool->print_error(); } @@ -33,11 +36,10 @@ my $config = new FML::Config; $config->set( 'map', 'x y z' ); $config->set( 'test', $value ); if ( $config->{ test } =~ /READ_ONLY\(x\)\s+READ_ONLY\(y\)\s+READ_ONLY\(z\)/) { - print "ok\n"; + $tool->print_ok(); } else { - print "fail\n"; - print $config->{ test }, "\n"; + $tool->print_error($config->{ test }); } 1; diff --git a/regress/cf/test.overload.pl b/regress/cf/test.overload.pl index d4664a7b..c664640d 100755 --- a/regress/cf/test.overload.pl +++ b/regress/cf/test.overload.pl @@ -1,6 +1,6 @@ #!/usr/bin/env perl # -# $FML: test.overload.pl,v 1.2 2002/04/18 14:18:09 fukachan Exp $ +# $FML: test.overload.pl,v 1.3 2002/07/22 09:38:10 fukachan Exp $ # use strict; @@ -8,6 +8,10 @@ use Carp; use lib qw(../../fml/lib ../../cpan/lib); use FML::Config; +use FML::Test::Utils; +my $tool = new FML::Test::Utils; +$tool->set_title("config.cf overload"); + my $debug = defined $ENV{'debug'} ? 1 : 0; my $config = new FML::Config; my @prev_x = (); @@ -25,11 +29,6 @@ for my $f (@ARGV) { $prev_x[ 0 ] =~ s/xxx/yyy/; -if ($prev_x[ 0 ] eq $prev_x[ 1 ]) { - print STDERR "ok\n"; -} -else { - print STDERR "fail\n"; -} +$tool->diff($prev_x[ 0 ], $prev_x[ 1 ]); -1; +exit 0; |
