doc: typos in test file.
[automake.git] / t / testsuite-summary-color.sh
blobffbe5c158d16e8eba681aa2d84dd6f0485cdcb27
1 #! /bin/sh
2 # Copyright (C) 2011-2024 Free Software Foundation, Inc.
4 # This program is free software; you can redistribute it and/or modify
5 # it under the terms of the GNU General Public License as published by
6 # the Free Software Foundation; either version 2, or (at your option)
7 # any later version.
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 # GNU General Public License for more details.
14 # You should have received a copy of the GNU General Public License
15 # along with this program. If not, see <https://www.gnu.org/licenses/>.
17 # Check coloring of the testsuite summary.
19 . test-lib.sh
21 use_colors=yes; use_vpath=no
22 . testsuite-summary-checks.sh
24 ./configure
26 # ANSI colors.
27 red='\e[0;31m'
28 grn='\e[0;32m'
29 lgn='\e[1;32m'
30 blu='\e[1;34m'
31 mgn='\e[0;35m'
32 brg='\e[1m';
33 std='\e[m';
35 success_header="\
36 ${grn}${br}${std}
37 ${grn}Testsuite summary for GNU AutoFoo 7.1${std}
38 ${grn}${br}${std}"
40 success_footer=${grn}${br}${std}
42 failure_header="\
43 ${red}${br}${std}
44 ${red}Testsuite summary for GNU AutoFoo 7.1${std}
45 ${red}${br}${std}"
47 failure_footer="\
48 ${red}${br}${std}
49 $failure_footer_text_colorized
50 ${red}${br}${std}"
52 do_check '' <<END
53 $success_header
54 # TOTAL: 0
55 # PASS: 0
56 # SKIP: 0
57 # XFAIL: 0
58 # FAIL: 0
59 # XPASS: 0
60 # ERROR: 0
61 $success_footer
62 END
64 do_check pass.t <<END
65 $success_header
66 ${brg}# TOTAL: 1${std}
67 ${grn}# PASS: 1${std}
68 # SKIP: 0
69 # XFAIL: 0
70 # FAIL: 0
71 # XPASS: 0
72 # ERROR: 0
73 $success_footer
74 END
76 do_check skip.t <<END
77 $success_header
78 ${brg}# TOTAL: 1${std}
79 # PASS: 0
80 ${blu}# SKIP: 1${std}
81 # XFAIL: 0
82 # FAIL: 0
83 # XPASS: 0
84 # ERROR: 0
85 $success_footer
86 END
88 do_check xfail.t <<END
89 $success_header
90 ${brg}# TOTAL: 1${std}
91 # PASS: 0
92 # SKIP: 0
93 ${lgn}# XFAIL: 1${std}
94 # FAIL: 0
95 # XPASS: 0
96 # ERROR: 0
97 $success_footer
98 END
100 do_check fail.t <<END
101 $failure_header
102 ${brg}# TOTAL: 1${std}
103 # PASS: 0
104 # SKIP: 0
105 # XFAIL: 0
106 ${red}# FAIL: 1${std}
107 # XPASS: 0
108 # ERROR: 0
109 $failure_footer
112 do_check xpass.t <<END
113 $failure_header
114 ${brg}# TOTAL: 1${std}
115 # PASS: 0
116 # SKIP: 0
117 # XFAIL: 0
118 # FAIL: 0
119 ${red}# XPASS: 1${std}
120 # ERROR: 0
121 $failure_footer
124 do_check error.t <<END
125 $failure_header
126 ${brg}# TOTAL: 1${std}
127 # PASS: 0
128 # SKIP: 0
129 # XFAIL: 0
130 # FAIL: 0
131 # XPASS: 0
132 ${mgn}# ERROR: 1${std}
133 $failure_footer
136 do_check pass.t xfail.t skip.t <<END
137 $success_header
138 ${brg}# TOTAL: 3${std}
139 ${grn}# PASS: 1${std}
140 ${blu}# SKIP: 1${std}
141 ${lgn}# XFAIL: 1${std}
142 # FAIL: 0
143 # XPASS: 0
144 # ERROR: 0
145 $success_footer
148 do_check pass.t fail.t skip.t <<END
149 $failure_header
150 ${brg}# TOTAL: 3${std}
151 ${grn}# PASS: 1${std}
152 ${blu}# SKIP: 1${std}
153 # XFAIL: 0
154 ${red}# FAIL: 1${std}
155 # XPASS: 0
156 # ERROR: 0
157 $failure_footer
160 do_check pass.t xfail.t xpass.t <<END
161 $failure_header
162 ${brg}# TOTAL: 3${std}
163 ${grn}# PASS: 1${std}
164 # SKIP: 0
165 ${lgn}# XFAIL: 1${std}
166 # FAIL: 0
167 ${red}# XPASS: 1${std}
168 # ERROR: 0
169 $failure_footer
172 do_check skip.t xfail.t error.t <<END
173 $failure_header
174 ${brg}# TOTAL: 3${std}
175 # PASS: 0
176 ${blu}# SKIP: 1${std}
177 ${lgn}# XFAIL: 1${std}
178 # FAIL: 0
179 # XPASS: 0
180 ${mgn}# ERROR: 1${std}
181 $failure_footer
184 do_check pass.t skip.t xfail.t fail.t xpass.t error.t <<END
185 $failure_header
186 ${brg}# TOTAL: 6${std}
187 ${grn}# PASS: 1${std}
188 ${blu}# SKIP: 1${std}
189 ${lgn}# XFAIL: 1${std}
190 ${red}# FAIL: 1${std}
191 ${red}# XPASS: 1${std}
192 ${mgn}# ERROR: 1${std}
193 $failure_footer