]> Raphaƫl G. Git Repositories - carabistouilles/blob - cunittest
Add updated readme
[carabistouilles] / cunittest
1 #! /bin/sh
2
3 TEST=`./analyse sirens_0_0.txt`;
4 RET=$?
5 if [ "$RET" != "0" -o "$TEST" != "Unique: 0, duplicate: 0" ]; then
6 echo "./analyse sirens_0_0.txt test failed";
7 exit 1;
8 fi
9
10 TEST=`./analyse sirens_0_1.txt`;
11 RET=$?
12 if [ "$RET" != "0" -o "$TEST" != "Unique: 0, duplicate: 1" ]; then
13 echo "./analyse sirens_0_1.txt test failed";
14 exit 2;
15 fi
16
17 TEST=`./analyse sirens_0_2.txt`;
18 RET=$?
19 if [ "$RET" != "0" -o "$TEST" != "Unique: 0, duplicates: 2" ]; then
20 echo "./analyse sirens_0_2.txt test failed";
21 exit 3;
22 fi
23
24 TEST=`./analyse sirens_0_3.txt`;
25 RET=$?
26 if [ "$RET" != "0" -o "$TEST" != "Unique: 0, duplicates: 3" ]; then
27 echo "./analyse sirens_0_3.txt test failed";
28 exit 4;
29 fi
30
31 TEST=`./analyse sirens_1_0.txt`;
32 RET=$?
33 if [ "$RET" != "0" -o "$TEST" != "Unique: 1, duplicate: 0" ]; then
34 echo "./analyse sirens_1_0.txt test failed";
35 exit 5;
36 fi
37
38 TEST=`./analyse sirens_1_1.txt`;
39 RET=$?
40 if [ "$RET" != "0" -o "$TEST" != "Unique: 1, duplicate: 1" ]; then
41 echo "./analyse sirens_1_1.txt test failed";
42 exit 6;
43 fi
44
45 TEST=`./analyse sirens_1_2.txt`;
46 RET=$?
47 if [ "$RET" != "0" -o "$TEST" != "Unique: 1, duplicates: 2" ]; then
48 echo "./analyse sirens_1_2.txt test failed";
49 exit 7;
50 fi
51
52 TEST=`./analyse sirens_1_3.txt`;
53 RET=$?
54 if [ "$RET" != "0" -o "$TEST" != "Unique: 1, duplicates: 3" ]; then
55 echo "./analyse sirens_1_3.txt test failed";
56 exit 8;
57 fi
58
59 TEST=`./analyse sirens_2_0.txt`;
60 RET=$?
61 if [ "$RET" != "0" -o "$TEST" != "Uniques: 2, duplicate: 0" ]; then
62 echo "./analyse sirens_2_0.txt test failed";
63 exit 9;
64 fi
65
66 TEST=`./analyse sirens_2_1.txt`;
67 RET=$?
68 if [ "$RET" != "0" -o "$TEST" != "Uniques: 2, duplicate: 1" ]; then
69 echo "./analyse sirens_2_1.txt test failed";
70 exit 10;
71 fi
72
73 TEST=`./analyse sirens_2_2.txt`;
74 RET=$?
75 if [ "$RET" != "0" -o "$TEST" != "Uniques: 2, duplicates: 2" ]; then
76 echo "./analyse sirens_2_2.txt test failed";
77 exit 11;
78 fi
79
80 TEST=`./analyse sirens_2_3.txt`;
81 RET=$?
82 if [ "$RET" != "0" -o "$TEST" != "Uniques: 2, duplicates: 3" ]; then
83 echo "./analyse sirens_2_3.txt test failed";
84 exit 12;
85 fi
86
87 TEST=`./analyse sirens_3_0.txt`;
88 RET=$?
89 if [ "$RET" != "0" -o "$TEST" != "Uniques: 3, duplicate: 0" ]; then
90 echo "./analyse sirens_3_0.txt test failed";
91 exit 13;
92 fi
93
94 TEST=`./analyse sirens_3_1.txt`;
95 RET=$?
96 if [ "$RET" != "0" -o "$TEST" != "Uniques: 3, duplicate: 1" ]; then
97 echo "./analyse sirens_3_1.txt test failed";
98 exit 14;
99 fi
100
101 TEST=`./analyse sirens_3_2.txt`;
102 RET=$?
103 if [ "$RET" != "0" -o "$TEST" != "Uniques: 3, duplicates: 2" ]; then
104 echo "./analyse sirens_3_2.txt test failed";
105 exit 15;
106 fi
107
108 TEST=`./analyse sirens_3_3.txt`;
109 RET=$?
110 if [ "$RET" != "0" -o "$TEST" != "Uniques: 3, duplicates: 3" ]; then
111 echo "./analyse sirens_3_3.txt test failed";
112 exit 16;
113 fi
114
115 TEST=`./analyse sirens_fxt.txt`;
116 RET=$?
117 if [ "$RET" != "0" -o "$TEST" != "Uniques: 77445, duplicates: 2256" ]; then
118 echo "./analyse sirens_fxt.txt test failed";
119 exit 17;
120 fi
121
122 echo "All test passed successfully"