Add simple autotests

Two main tests: read the file and compare to a given image (loaded from
png), and write a file out and compare to a previously-written image.

The write test in particular is kind of fragile, but it should help
catch some errors where a code change was not intended to affect the
output of the plugin.

Tests are included for all the writable formats, as well as every
readable format that GIMP can write to (and so I could easily get an
example of).

REVIEW: 115430
This commit is contained in:
Alex Merry
2014-02-01 17:50:15 +00:00
parent 32f7d48b3c
commit f0f6d14367
95 changed files with 2520 additions and 2 deletions

View File

@ -0,0 +1,134 @@
%!PS-Adobe-3.0 EPSF-3.0
%%Creator: GIMP PostScript file plugin V 1.17 by Peter Kirchgessner
%%Title: rgb-gimp-2.8.10.eps
%%CreationDate: Sun Feb 2 02:52:43 2014
%%DocumentData: Clean7Bit
%%LanguageLevel: 2
%%Pages: 1
%%BoundingBox: 14 14 47 47
%%EndComments
%%BeginProlog
% Use own dictionary to avoid conflicts
10 dict begin
%%EndProlog
%%Page: 1 1
% Translate for offset
14.173228346456694 14.173228346456694 translate
% Translate to begin of first scanline
0 32 translate
32 -32 scale
% Image geometry
32 32 8
% Transformation matrix
[ 32 0 0 32 0 0 ]
% Strings to hold RGB-samples per scanline
/rstr 32 string def
/gstr 32 string def
/bstr 32 string def
{currentfile /ASCII85Decode filter /RunLengthDecode filter rstr readstring pop}
{currentfile /ASCII85Decode filter /RunLengthDecode filter gstr readstring pop}
{currentfile /ASCII85Decode filter /RunLengthDecode filter bstr readstring pop}
true 3
%%BeginData: 2062 ASCII Bytes
colorimage
iW"E~>
iW"E~>
iW"E~>
iW"E~>
iW"E~>
iW"E~>
rr3l8qtTj[qY'@Go(;YFp\t!Umd0N=o(_nMr;Q_H~>
rr3i7qYL3ks8Murs8DQZo^(l=rV?9dq>(!grVqB~>
r;RQ3p?_#1q>0g\p$Lr7o'Pf>qXX=HmJ?e]J,~>
s8O,=nBneOeC:XDIuUA;Vpk(NI>;j;^80&UU>,VGs*t~>
s8O#:mE3iKrr2]^qto3FY/,OEk3:(>i7$6GnbW7bJ,~>
rVm`6lE4o2NnVdeaJsl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