]> mj.ucw.cz Git - eval.git/blob - judge/judge-tok.t
Avoid Perl when printing signal names.
[eval.git] / judge / judge-tok.t
1 # Test cases for judge-tok.c
2
3 # Identical input and output
4 Name:   ok
5 Run:    bin/judge-tok $1 $2
6 In1:    abc d e fgh
7         ijk lmn
8 In2:    abc d e fgh
9         ijk lmn
10
11 # Differences in whitespaces are OK
12 Name:   ws
13 Run:    bin/judge-tok $1 $2
14 In1:    abc       d e fgh  
15            ijk  lmn
16 In2:    abc d  e fgh
17         ijk lmn
18
19 # Differences in line breaks are not
20 Name:   lines1
21 Run:    bin/judge-tok $1 $2
22 In1:    abc  d
23         e fgh  
24            ijk  lmn
25 In2:    abc d e fgh
26         ijk lmn
27 Exit:   1
28
29 # ... unless the -n switch is given
30 Name:   lines2
31 Run:    bin/judge-tok -n $1 $2
32 In1:    abc   d
33         e fgh  
34            ijk  lmn
35 In2:    abc d e fgh
36         ijk lmn
37
38 # Trailing empty lines are also not OK
39 Name:   trail1
40 Run:    echo >>$1 && bin/judge-tok $1 $2
41 In1:    abc d e fgh
42         ijk lmn
43 In2:    abc d e fgh
44         ijk lmn
45 Exit:   1
46
47 # ... unless -t is given
48 Name:   trail1
49 Run:    echo >>$1 && bin/judge-tok -t $1 $2
50 In1:    abc d e fgh
51         ijk lmn
52 In2:    abc d e fgh
53         ijk lmn
54
55 # Differences in case are not
56 Name:   case1
57 Run:    bin/judge-tok $1 $2
58 In1:    abc d e FGH
59         IJK lmn
60 In2:    abc d e fgh
61         ijk lmn
62 Exit:   1
63
64 # ... unless -i is given
65 Name:   case2
66 Run:    bin/judge-tok -i $1 $2
67 In1:    abc d e FGH
68         IJK lmn
69 In2:    abc d e fgh
70         ijk lmn
71
72 # By default, we compare everything literal
73 Name:   real1
74 Run:    bin/judge-tok $1 $2
75 In1:    0.1000001
76         1.
77         1e-50
78         1230000001
79 In2:    0.1
80         1.
81         0
82         1230000000
83 Exit:   1
84
85 # ... but if -r is given, we allow small differences
86 Name:   real2
87 Run:    bin/judge-tok -r $1 $2
88 In1:    0.1000001
89         1.
90         1e-50
91         1230000001
92 In2:    0.1
93         1.
94         0
95         1230000000