blob: fc390f26f7a9659c4034b1c217a133491065542a (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
|
#! /bin/sh
# This script tests: ppmwheel
# Also requires:
# For values 6 and above, x86(-32) and x86-64 produce different output.
# SSE floating-point math is the probable cause.
echo "Test 1."
for i in 4 5
do
ppmwheel $i | cksum
done
# i 32 bit 64 bit
#
# 6: 343122583 119 142348877 119
# 7: 3572780137 158 3220488357 158
# 8: 3078449954 203 1413542034 203
# 9: 3437862278 254 311501249 254
# 10: 1111245327 313 582960969 313
# 11: 548273236 376 3726921442 376
# 12: 2741456118 445 3696607391 445
# 13: 673636665 520 1059273944 520
# 14: 2445730101 601 3445053713 601
# 15: 592850912 688 1691004230 688
# 16: 3302887123 781 86998539 781
# 17: 1786065899 880 2476986124 880
# 18: 186804914 985 2853442889 985
# 19: 1453260662 1096 3182405636 1096
# 20: 1467480434 1213 4040494227 1213
# 21: 1062903055 1336 810283715 1336
# 22: 2638704989 1465 338245948 1465
# 23: 3441453532 1600 2213581565 1600
# 24: 1836362684 1741 2056241218 1741
# 25: 3423398348 1888 3519123827 1888
# 26: 3262548375 2041 684292199 2041
# 27: 3598993221 2200 1577275941 2200
# 28: 3728319498 2365 1061803162 2365
# 29: 3729945629 2536 133069086 2536
# 30: 3645113424 2713 3302414477 2713
# 31: 2873651818 2896 3660671646 2896
# 32: 1408491813 3085 2010949125 3085
# 33: 3781351758 3280 1548995986 3280
# 34: 3242345057 3481 3082631326 3481
# 35: 2550511376 3688 1038419921 3688
# 36: 1028065649 3901 2532290776 3901
# 37: 1140380377 4120 2428435544 4120
# 38: 1066850059 4345 3102961014 4345
# 39: 3620700071 4576 1898018896 4576
# 40: 504158758 4813 272658385 4813
# 41: 1349365217 5056 270227718 5056
# 42: 41774986 5305 509262620 5305
# 43: 2655322328 5560 4133072843 5560
# 44: 2318607206 5821 3294034402 5821
# 45: 2178510518 6088 3314361750 6088
# 46: 3285054002 6361 2469557621 6361
# 47: 3047461329 6640 3629344726 6640
# 48: 137286416 6925 4222495543 6925
# 49: 2115001463 7216 2668575184 7216
# 50: 1677997300 7513 2978221605 7513
# 51: 1365174489 7816 3575061958 7816
# 52: 2863311036 8125 1791798959 8125
# 53: 3791281707 8440 3482008958 8440
# 54: 2687508733 8761 4163388707 8761
# 55: 2593010606 9088 3561733531 9088
# 56: 2976537803 9421 3234561645 9421
# 57: 2850729115 9760 1244925692 9760
# 58: 224433311 10105 3825098819 10105
# 59: 547683536 10456 3988409437 10456
# 60: 369722519 10813 2020750234 10813
# 61: 745454697 11176 1184600938 11176
# 62: 1380472574 11545 1044589924 11545
# 63: 1812671001 11920 238104621 11920
# 64: 2833858343 12301 228306790 12301
# 65: 957265138 12688 470109697 12688
# 66: 895413590 13081 944950937 13081
# 67: 3724154793 13480 126668527 13480
# 68: 741064239 13885 1930273504 13885
# 69: 785023636 14296 3279987135 14296
# 70: 3649222232 14713 2854788625 14713
# 71: 1997467987 15136 1689264112 15136
# 72: 3469507186 15565 682126673 15565
# 73: 2831204610 16000 1826370607 16000
# 74: 3154512856 16441 1843713601 16441
# 75: 1469123916 16888 3700274597 16888
# 76: 2909139778 17341 2769322155 17341
# 77: 2945643808 17800 1176063119 17800
# 78: 3334870474 18265 2274153840 18265
# 79: 1788316629 18736 1170513638 18736
# 80: 1236198778 19213 780491458 19213
# 81: 1946474293 19696 2989417839 19696
# 82: 1479086076 20185 1500511762 20185
# 83: 3510147444 20680 1990564736 20680
# 84: 4044688071 21181 2820276538 21181
# 85: 1293455808 21688 1335142677 21688
# 86: 3408774244 22201 2664774438 22201
# 87: 3591290969 22720 1236374968 22720
# 88: 3814759633 23245 2889543826 23245
# 89: 4157749717 23776 4033323913 23776
# 90: 3512276083 24313 1722273029 24313
# 91: 797424413 24856 1737843448 24856
# 92: 3480584612 25405 1304329442 25405
# 93: 2445523895 25960 1260847516 25960
# 94: 3157009888 26521 1120864660 26521
# 95: 103872014 27088 2076594208 27088
# 96: 1584398684 27661 213099822 27661
# 97: 3586313190 28240 944151015 28240
# 98: 4086203619 28825 1961862620 28825
# 99: 3656777902 29416 2475351252 29416
# 100: 2246720411 30015 4055518595 30015
echo "Test Invalid."
tmpdir=${tmpdir:-/tmp}
test_out=${tmpdir}/test_out
echo 1>&2
echo "Invalid command-line argument combinations." 1>&2
echo "Error messages should appear below the line." 1>&2
echo "-----------------------------------------------------------" 1>&2
ppmwheel 10 -huevalue -huesaturation > ${test_out} || \
echo -n "Expected failure 1"
test -s ${test_out}; echo " "$?
rm -f ${test_out}
ppmwheel 0 > ${test_out} || \
echo -n "Expected failure 2"
test -s ${test_out}; echo " "$?
rm -f ${test_out}
ppmwheel 3 > ${test_out} || \
echo -n "Expected failure 3"
test -s ${test_out}; echo " "$?
rm -f ${test_out}
ppmwheel > ${test_out} || \
echo -n "Expected failure 4"
test -s ${test_out}; echo " "$?
rm -f ${test_out}
ppmwheel 10 10 > ${test_out} || \
echo -n "Expected failure 5"
test -s ${test_out}; echo " "$?
rm -f ${test_out}
|