]> git.draconx.ca Git - rrace.git/blob - tests/gui.at
Separate EWMH colour conversion from icon generation.
[rrace.git] / tests / gui.at
1 # Copyright © 2022-2023 Nick Bowler
2 #
3 # This program is free software: you can redistribute it and/or modify
4 # it under the terms of the GNU General Public License as published by
5 # the Free Software Foundation, either version 3 of the License, or
6 # (at your option) any later version.
7 #
8 # This program is distributed in the hope that it will be useful,
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
11 # GNU General Public License for more details.
12 #
13 # You should have received a copy of the GNU General Public License
14 # along with this program.  If not, see <https://www.gnu.org/licenses/>.
15
16 TEST_TAP_SIMPLE([ewmh_icon_prepare_cmap],
17   [ewmhicon --test-cmap], [], [gui ewmh icon])
18
19 AT_SETUP([_NET_WM_ICON tiles (16x16)])
20 AT_KEYWORDS([gui ewmh icon])
21
22 AT_CHECK([ewmhicon 16x16], [0], [[/* XPM */
23 static char *icon[] = {
24 "16 16 3 1",
25 ". c #ff0000",
26 "% c #00ff00",
27 "+ c #0000ff",
28 "....%+....%+....",
29 "....%+....%+....",
30 "....%+....%+....",
31 "....%+....%+....",
32 "%%%%%+%%%%%+%%%%",
33 "++++++++++++++++",
34 "....%+....%+....",
35 "....%+....%+....",
36 "....%+....%+....",
37 "....%+....%+....",
38 "%%%%%+%%%%%+%%%%",
39 "++++++++++++++++",
40 "....%+....%+....",
41 "....%+....%+....",
42 "....%+....%+....",
43 "....%+....%+...."
44 };
45 ]])
46
47 AT_CLEANUP
48
49 AT_SETUP([_NET_WM_ICON tiles (24x24)])
50 AT_KEYWORDS([gui ewmh icon])
51
52 AT_CHECK([ewmhicon 24x24], [0], [[/* XPM */
53 static char *icon[] = {
54 "24 24 3 1",
55 ". c #ff0000",
56 "% c #00ff00",
57 "+ c #0000ff",
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 AT_CLEANUP
86
87 AT_SETUP([_NET_WM_ICON tiles (32x32)])
88 AT_KEYWORDS([gui ewmh icon])
89
90 AT_CHECK([ewmhicon 32x32], [0], [[/* XPM */
91 static char *icon[] = {
92 "32 32 3 1",
93 ". c #ff0000",
94 "% c #00ff00",
95 "+ c #0000ff",
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 AT_CLEANUP
132
133 AT_SETUP([_NET_WM_ICON tiles (48x48)])
134 AT_KEYWORDS([gui ewmh icon])
135
136 AT_CHECK([ewmhicon 48x48], [0], [[/* XPM */
137 static char *icon[] = {
138 "48 48 3 1",
139 ". c #ff0000",
140 "% c #00ff00",
141 "+ c #0000ff",
142 "++++++++++++++++++++++++++++++++++++++++++++++++",
143 "+++++++++++++++%+++++++++++++++%+++++++++++++++%",
144 "++............%%++............%%++............%%",
145 "++............%%++............%%++............%%",
146 "++............%%++............%%++............%%",
147 "++............%%++............%%++............%%",
148 "++............%%++............%%++............%%",
149 "++............%%++............%%++............%%",
150 "++............%%++............%%++............%%",
151 "++............%%++............%%++............%%",
152 "++............%%++............%%++............%%",
153 "++............%%++............%%++............%%",
154 "++............%%++............%%++............%%",
155 "++............%%++............%%++............%%",
156 "++%%%%%%%%%%%%%%++%%%%%%%%%%%%%%++%%%%%%%%%%%%%%",
157 "+%%%%%%%%%%%%%%%+%%%%%%%%%%%%%%%+%%%%%%%%%%%%%%%",
158 "++++++++++++++++++++++++++++++++++++++++++++++++",
159 "+++++++++++++++%+++++++++++++++%+++++++++++++++%",
160 "++............%%++............%%++............%%",
161 "++............%%++............%%++............%%",
162 "++............%%++............%%++............%%",
163 "++............%%++............%%++............%%",
164 "++............%%++............%%++............%%",
165 "++............%%++............%%++............%%",
166 "++............%%++............%%++............%%",
167 "++............%%++............%%++............%%",
168 "++............%%++............%%++............%%",
169 "++............%%++............%%++............%%",
170 "++............%%++............%%++............%%",
171 "++............%%++............%%++............%%",
172 "++%%%%%%%%%%%%%%++%%%%%%%%%%%%%%++%%%%%%%%%%%%%%",
173 "+%%%%%%%%%%%%%%%+%%%%%%%%%%%%%%%+%%%%%%%%%%%%%%%",
174 "++++++++++++++++++++++++++++++++++++++++++++++++",
175 "+++++++++++++++%+++++++++++++++%+++++++++++++++%",
176 "++............%%++............%%++............%%",
177 "++............%%++............%%++............%%",
178 "++............%%++............%%++............%%",
179 "++............%%++............%%++............%%",
180 "++............%%++............%%++............%%",
181 "++............%%++............%%++............%%",
182 "++............%%++............%%++............%%",
183 "++............%%++............%%++............%%",
184 "++............%%++............%%++............%%",
185 "++............%%++............%%++............%%",
186 "++............%%++............%%++............%%",
187 "++............%%++............%%++............%%",
188 "++%%%%%%%%%%%%%%++%%%%%%%%%%%%%%++%%%%%%%%%%%%%%",
189 "+%%%%%%%%%%%%%%%+%%%%%%%%%%%%%%%+%%%%%%%%%%%%%%%"
190 };
191 ]])
192
193 AT_CLEANUP