move the existing dynfilt test into dynfilt/t, update it to use
authorTony Cook <tony@develop=help.com>
Fri, 18 Aug 2006 07:08:37 +0000 (07:08 +0000)
committerTony Cook <tony@develop=help.com>
Fri, 18 Aug 2006 07:08:37 +0000 (07:08 +0000)
Test::More and remove the dummy test script

MANIFEST
TODO
dynfilt/t/t00dummy.t [deleted file]
dynfilt/t/t60dyntest.t [new file with mode: 0644]
t/t60dyntest.t [deleted file]

index dd422f0..efa2e0d 100644 (file)
--- a/MANIFEST
+++ b/MANIFEST
@@ -77,7 +77,7 @@ dynfilt/flines.exp
 dynfilt/mandelbrot.c
 dynfilt/mandelbrot.exp
 dynfilt/pluginst.h
-dynfilt/t/t00dummy.t   Dummy test script to prevent smoker problems
+dynfilt/t/t60dyntest.t Simple test script
 errep.perl
 error.c
 ext.h
diff --git a/TODO b/TODO
index ec27cad..2d26f6d 100644 (file)
--- a/TODO
+++ b/TODO
@@ -18,7 +18,7 @@ pnmscale based alternative scale method (done)
 
 rubthrough 4 on 4
 
-replace dummy test script in dynfilt with a real one
+replace dummy test script in dynfilt with a real one (done)
 
 BEFORE 0.50:
 
diff --git a/dynfilt/t/t00dummy.t b/dynfilt/t/t00dummy.t
deleted file mode 100644 (file)
index b642616..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-#!perl -w
-use strict;
-use lib '../t';
-use Test::More tests => 1;
-# some smoke testers have been confused because there are no tests
-# in this directory
-pass("Dummy test");
diff --git a/dynfilt/t/t60dyntest.t b/dynfilt/t/t60dyntest.t
new file mode 100644 (file)
index 0000000..5a2635d
--- /dev/null
@@ -0,0 +1,31 @@
+#!perl -w
+use strict;
+use lib '../t';
+use Test::More tests => 4;
+BEGIN { use_ok(Imager => qw(:default)); }
+use Config;
+
+#$Imager::DEBUG=1;
+
+Imager::init('log'=>'../testout/t60dyntest.log');
+
+my $img=Imager->new() || die "unable to create image object\n";
+
+$img->read(file=>'../testout/t104.ppm',type=>'pnm') 
+  || die "failed: ",$img->{ERRSTR},"\n";
+
+my $plug='./dyntest.'.$Config{'so'};
+ok(load_plugin($plug), "load plugin")
+  || die "unable to load plugin: $Imager::ERRSTR\n";
+
+my %hsh=(a=>35,b=>200,type=>'lin_stretch');
+ok($img->filter(%hsh), "call filter");
+
+$img->write(type=>'pnm',file=>'../testout/t60.ppm') 
+  || die "error in write()\n";
+
+ok(unload_plugin($plug), "unload plugin")
+  || die "unable to unload plugin: $Imager::ERRSTR\n";
+
+
+
diff --git a/t/t60dyntest.t b/t/t60dyntest.t
deleted file mode 100644 (file)
index fddf8a2..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-BEGIN { $| = 1; print "1..3\n"; }
-END {print "not ok 1\n" unless $loaded;}
-use Imager qw(:default);
-use Config;
-$loaded = 1;
-
-#$Imager::DEBUG=1;
-
-Imager::init('log'=>'testout/t60dyntest.log');
-
-$img=Imager->new() || die "unable to create image object\n";
-
-$img->open(file=>'testout/t104.ppm',type=>'pnm') || die "failed: ",$img->{ERRSTR},"\n";
-
-$plug='dynfilt/dyntest.'.$Config{'so'};
-load_plugin($plug) || die "unable to load plugin:\n$Imager::ERRSTR\n";
-
-print "ok\nok\n"; # exit;
-
-%hsh=(a=>35,b=>200,type=>lin_stretch);
-$img->filter(%hsh);
-
-$img->write(type=>'pnm',file=>'testout/t60.ppm') || die "error in write()\n";
-
-unload_plugin($plug) || die "unable to unload plugin: $Imager::ERRSTR\n";
-
-print "ok\n";
-
-