summaryrefslogtreecommitdiffstats
path: root/t
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2014-10-07 13:29:26 -0400
committerJesse Luehrs <doy@tozt.net>2014-10-07 13:29:26 -0400
commit35a0bc2f82802800bdb0769882d667d59313f141 (patch)
tree7e861ca1c3f9a23366adc3dbfd1b881c813bbccf /t
parent3151013be7b78d79f5c0db3d5e7b95b2714dc88f (diff)
downloadimage-pnm-35a0bc2f82802800bdb0769882d667d59313f141.tar.gz
image-pnm-35a0bc2f82802800bdb0769882d667d59313f141.zip
initial sketch
Diffstat (limited to 't')
-rw-r--r--t/P3.t23
-rw-r--r--t/data/P3.pnm196
2 files changed, 219 insertions, 0 deletions
diff --git a/t/P3.t b/t/P3.t
new file mode 100644
index 0000000..5712ace
--- /dev/null
+++ b/t/P3.t
@@ -0,0 +1,23 @@
+#!/usr/bin/env perl
+use strict;
+use warnings;
+use Test::More;
+
+use Image::PNM;
+
+my $image = Image::PNM->new('t/data/P3.pnm');
+is($image->as_string('P3'), <<IMAGE);
+P3
+8 8
+255
+255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255
+255 255 255 255 255 255 255 255 255 0 84 255 0 84 255 255 255 255 255 255 255 255 255 255
+255 255 255 255 255 255 0 0 0 255 255 255 255 255 255 0 0 0 255 255 255 255 255 255
+255 255 255 0 0 0 255 255 255 255 255 255 255 255 255 255 255 255 0 0 0 255 255 255
+255 255 255 0 0 0 255 0 0 255 0 0 255 0 0 255 0 0 0 0 0 255 255 255
+255 255 255 0 0 0 255 255 255 255 255 255 255 255 255 255 255 255 0 0 0 255 255 255
+255 255 255 0 0 0 255 255 255 255 255 255 255 255 255 255 255 255 0 0 0 255 255 255
+255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255
+IMAGE
+
+done_testing;
diff --git a/t/data/P3.pnm b/t/data/P3.pnm
new file mode 100644
index 0000000..df64d54
--- /dev/null
+++ b/t/data/P3.pnm
@@ -0,0 +1,196 @@
+P3
+# CREATOR: GIMP PNM Filter Version 1.1
+8 8
+255
+255
+255
+255
+255
+255
+255
+255
+255
+255
+255
+255
+255
+255
+255
+255
+255
+255
+255
+255
+255
+255
+255
+255
+255
+255
+255
+255
+255
+255
+255
+255
+255
+255
+0
+84
+255
+0
+84
+255
+255
+255
+255
+255
+255
+255
+255
+255
+255
+255
+255
+255
+255
+255
+255
+0
+0
+0
+255
+255
+255
+255
+255
+255
+0
+0
+0
+255
+255
+255
+255
+255
+255
+255
+255
+255
+0
+0
+0
+255
+255
+255
+255
+255
+255
+255
+255
+255
+255
+255
+255
+0
+0
+0
+255
+255
+255
+255
+255
+255
+0
+0
+0
+255
+0
+0
+255
+0
+0
+255
+0
+0
+255
+0
+0
+0
+0
+0
+255
+255
+255
+255
+255
+255
+0
+0
+0
+255
+255
+255
+255
+255
+255
+255
+255
+255
+255
+255
+255
+0
+0
+0
+255
+255
+255
+255
+255
+255
+0
+0
+0
+255
+255
+255
+255
+255
+255
+255
+255
+255
+255
+255
+255
+0
+0
+0
+255
+255
+255
+255
+255
+255
+255
+255
+255
+255
+255
+255
+255
+255
+255
+255
+255
+255
+255
+255
+255
+255
+255
+255
+255
+255
+255