File tree 8 files changed +79
-7
lines changed
8 files changed +79
-7
lines changed Original file line number Diff line number Diff line change @@ -103,6 +103,7 @@ pamslice-roundtrip.test
103
103
104
104
# Round-trip tests : lossless converters
105
105
106
+ ppmtoarbtxt-roundtrip.test
106
107
atari-roundtrip.test
107
108
atk-roundtrip.test
108
109
avs-roundtrip.test
@@ -141,6 +142,7 @@ wbmp-roundtrip.test
141
142
winicon-roundtrip.test
142
143
xbm-roundtrip.test
143
144
xpm-roundtrip.test
145
+ xv-roundtrip.test
144
146
xwd-roundtrip.test
145
147
146
148
# Round-trip tests : lossy converter
Original file line number Diff line number Diff line change 1
1
2425386270 41
2
- 1005016577 51851
2
+ 2425386270 41
3
+ 2329957971 51851
4
+ 2907103393 5086
5
+ 2907103393 5086
Original file line number Diff line number Diff line change 1
1
#! /bin/bash
2
2
# This script tests: pbmtomacp macptopbm
3
- # Also requires: pnmcrop pbmmake
3
+ # Also requires: pnmcrop pbmpage pbmupc pnmpad
4
4
5
+ tmpdir=${tmpdir:-/ tmp}
6
+ temp1_pbm=${tmpdir} /temp1.ppm
7
+ temp2_pbm=${tmpdir} /temp2.ppm
5
8
6
- # Test 1. Should produce 2425386270 41
7
- pbmtomacp testgrid.pbm | macptopbm | pnmcrop | cksum
8
9
9
- # Test 2. Should produce 1005016577 51851
10
- pbmmake -g 576 720 | pbmtomacp | macptopbm | cksum
10
+ # Test 1. Should produce 2425386270 41 twice
11
+ # Because Macpaint files are fixed size (576 x 720 pixels)
12
+ # pbmtomacp automatically adds padding when input is smaller.
13
+
14
+ pbmtomacp testgrid.pbm | macptopbm | tee ${temp1_pbm} | \
15
+ pnmcrop | cksum
16
+
17
+ pbmtomacp ${temp1_pbm} | macptopbm | pnmcrop | cksum
18
+
19
+
20
+ # Test 2. Should produce 2329957971 51851
21
+ pbmpage 1 | pbmtomacp | macptopbm | cksum
22
+
23
+
24
+ # Test 3. Should produce 2907103393 5086 twice
25
+ pbmupc 0 12345 67890 | pnmpad -black -t 44 -b 20 -l 100 -r 251 | pbmtomacp | macptopbm | \
26
+ tee ${temp2_pbm} | \
27
+ pnmcrop | pnmcrop | cksum
28
+
29
+ pbmtomacp ${temp2_pbm} | macptopbm | pnmcrop | pnmcrop | cksum
30
+
31
+ rm ${temp1_pbm} ${temp2_pbm}
Original file line number Diff line number Diff line change @@ -9,7 +9,9 @@ ppmdmkfont | ppmddumpfont 2>&1 | cksum
9
9
# Test 2. Should produce: 2845495212 75033
10
10
ppmdmkfont | ppmdcfont | cksum
11
11
12
- # There is a strange glitch in output when ppmdcfont is compiled by clang:
12
+ # There is a strange glitch in output when ppmdcfont is compiled by
13
+ # clang version 3.2. Optimization (-O3) seems to be a factor.
14
+ #
13
15
# 3171,3173c3171,3173
14
16
# < 0x01,
15
17
# < 95,
Original file line number Diff line number Diff line change
1
+ 1926073387 101484
2
+ 1926073387 101484
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+ # This script tests: ppmtoarbtxt
3
+ # Also requires: pnminvert pamtopnm
4
+
5
+ # Test. Invert colors.
6
+ # Should print 1926073387 101484
7
+
8
+ tmpdir=${tmpdir:-/ tmp}
9
+ headskl=${tmpdir} /headskl
10
+ bodyskl=${tmpdir} /bodyskl
11
+ inv_ppm=${tmpdir} /inv.ppm
12
+
13
+ cat > ${headskl} << EOF
14
+ P3
15
+ #(width) #(height)
16
+ 255
17
+
18
+ EOF
19
+
20
+ cat > ${bodyskl} << EOF
21
+ #(ired %d 255 0) #(igreen %d 255 0) #(iblue %d 255 0)
22
+
23
+ EOF
24
+
25
+ ppmtoarbtxt ${bodyskl} -hd ${headskl} testimg.ppm | tee ${inv_ppm} |
26
+ pnminvert | cksum
27
+
28
+
29
+ # Test 2.
30
+
31
+ cat ${inv_ppm} | ppmtoarbtxt ${bodyskl} -hd ${headskl} | pamtopnm | cksum
32
+
33
+
34
+ rm ${bodyskl} ${headskl}
Original file line number Diff line number Diff line change
1
+ 2418728144 101484
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+ # This script tests: pamtoxvmini xvminitoppm
3
+ # Also requires: pamdepth
4
+
5
+ # Test. Should print 2418728144 101484
6
+
7
+ pamdepth 3 testimg.ppm | pamtoxvmini | xvminitoppm | cksum
You can’t perform that action at this time.
0 commit comments