aboutsummaryrefslogtreecommitdiffstats
path: root/libtests/qtest/png_filter.test
diff options
context:
space:
mode:
Diffstat (limited to 'libtests/qtest/png_filter.test')
-rw-r--r--libtests/qtest/png_filter.test63
1 files changed, 63 insertions, 0 deletions
diff --git a/libtests/qtest/png_filter.test b/libtests/qtest/png_filter.test
new file mode 100644
index 00000000..5b75a208
--- /dev/null
+++ b/libtests/qtest/png_filter.test
@@ -0,0 +1,63 @@
+#!/usr/bin/env perl
+require 5.008;
+BEGIN { $^W = 1; }
+use strict;
+use File::Copy;
+use Digest::MD5;
+
+chdir("png_filter") or die "chdir testdir failed: $!\n";
+
+require TestDriver;
+
+my $td = new TestDriver('png_filter');
+
+cleanup();
+
+$td->runtest("decode columns = 4",
+ {$td->COMMAND => "png_filter decode in1 4"},
+ {$td->STRING => "done\n",
+ $td->EXIT_STATUS => 0},
+ $td->NORMALIZE_NEWLINES);
+
+$td->runtest("check output",
+ {$td->FILE => "out"},
+ {$td->FILE => "out1"});
+
+$td->runtest("decode columns = 5",
+ {$td->COMMAND => "png_filter decode in2 5"},
+ {$td->STRING => "done\n",
+ $td->EXIT_STATUS => 0},
+ $td->NORMALIZE_NEWLINES);
+
+$td->runtest("check output",
+ {$td->FILE => "out"},
+ {$td->FILE => "out2"});
+
+$td->runtest("encode columns = 4",
+ {$td->COMMAND => "png_filter encode out1 4"},
+ {$td->STRING => "done\n",
+ $td->EXIT_STATUS => 0},
+ $td->NORMALIZE_NEWLINES);
+
+$td->runtest("check output",
+ {$td->FILE => "out"},
+ {$td->FILE => "in1"});
+
+$td->runtest("encode columns = 5",
+ {$td->COMMAND => "png_filter encode out2 5"},
+ {$td->STRING => "done\n",
+ $td->EXIT_STATUS => 0},
+ $td->NORMALIZE_NEWLINES);
+
+$td->runtest("check output",
+ {$td->FILE => "out"},
+ {$td->FILE => "in2"});
+
+cleanup();
+
+$td->report(8);
+
+sub cleanup
+{
+ unlink "out";
+}