]> git.proxmox.com Git - libgit2.git/blame - tests/status/status_data.h
Rename tests-clar to tests
[libgit2.git] / tests / status / status_data.h
CommitLineData
dc13f1f7 1#include "status_helpers.h"
11385c3c 2
75f98a95
BS
3// A utf-8 string with 83 characters, but 249 bytes.
4static const char *longname = "\xe5\x8f\x97\xe5\x8f\x97\xe5\x8f\x97\xe5\x8f\x97\xe5\x8f\x97\xe5\x8f\x97\xe5\x8f\x97\xe5\x8f\x97\xe5\x8f\x97\xe5\x8f\x97\xe5\x8f\x97\xe5\x8f\x97\xe5\x8f\x97\xe5\x8f\x97\xe5\x8f\x97\xe5\x8f\x97\xe5\x8f\x97\xe5\x8f\x97\xe5\x8f\x97\xe5\x8f\x97\xe5\x8f\x97\xe5\x8f\x97\xe5\x8f\x97\xe5\x8f\x97\xe5\x8f\x97\xe5\x8f\x97\xe5\x8f\x97\xe5\x8f\x97\xe5\x8f\x97\xe5\x8f\x97\xe5\x8f\x97\xe5\x8f\x97\xe5\x8f\x97\xe5\x8f\x97\xe5\x8f\x97\xe5\x8f\x97\xe5\x8f\x97\xe5\x8f\x97\xe5\x8f\x97\xe5\x8f\x97\xe5\x8f\x97\xe5\x8f\x97\xe5\x8f\x97\xe5\x8f\x97\xe5\x8f\x97\xe5\x8f\x97\xe5\x8f\x97\xe5\x8f\x97\xe5\x8f\x97\xe5\x8f\x97\xe5\x8f\x97\xe5\x8f\x97\xe5\x8f\x97\xe5\x8f\x97\xe5\x8f\x97\xe5\x8f\x97\xe5\x8f\x97\xe5\x8f\x97\xe5\x8f\x97\xe5\x8f\x97\xe5\x8f\x97\xe5\x8f\x97\xe5\x8f\x97\xe5\x8f\x97\xe5\x8f\x97\xe5\x8f\x97\xe5\x8f\x97\xe5\x8f\x97\xe5\x8f\x97\xe5\x8f\x97\xe5\x8f\x97\xe5\x8f\x97\xe5\x8f\x97\xe5\x8f\x97\xe5\x8f\x97\xe5\x8f\x97\xe5\x8f\x97\xe5\x8f\x97\xe5\x8f\x97\xe5\x8f\x97\xe5\x8f\x97\xe5\x8f\x97\xe5\x8f\x97";
8c8a5490
BS
5
6
a56aacf4
RB
7/* entries for a plain copy of tests/resources/status */
8
11385c3c
VM
9static const char *entry_paths0[] = {
10 "file_deleted",
df743c7d 11 "ignored_file",
11385c3c
VM
12 "modified_file",
13 "new_file",
14 "staged_changes",
15 "staged_changes_file_deleted",
16 "staged_changes_modified_file",
17 "staged_delete_file_deleted",
18 "staged_delete_modified_file",
19 "staged_new_file",
20 "staged_new_file_deleted_file",
21 "staged_new_file_modified_file",
22
23 "subdir/deleted_file",
24 "subdir/modified_file",
25 "subdir/new_file",
8e60c712
AR
26
27 "\xe8\xbf\x99",
11385c3c
VM
28};
29
30static const unsigned int entry_statuses0[] = {
31 GIT_STATUS_WT_DELETED,
e1bcc191 32 GIT_STATUS_IGNORED,
11385c3c
VM
33 GIT_STATUS_WT_MODIFIED,
34 GIT_STATUS_WT_NEW,
35 GIT_STATUS_INDEX_MODIFIED,
36 GIT_STATUS_INDEX_MODIFIED | GIT_STATUS_WT_DELETED,
37 GIT_STATUS_INDEX_MODIFIED | GIT_STATUS_WT_MODIFIED,
38 GIT_STATUS_INDEX_DELETED,
39 GIT_STATUS_INDEX_DELETED | GIT_STATUS_WT_NEW,
40 GIT_STATUS_INDEX_NEW,
41 GIT_STATUS_INDEX_NEW | GIT_STATUS_WT_DELETED,
42 GIT_STATUS_INDEX_NEW | GIT_STATUS_WT_MODIFIED,
43
44 GIT_STATUS_WT_DELETED,
45 GIT_STATUS_WT_MODIFIED,
46 GIT_STATUS_WT_NEW,
8e60c712
AR
47
48 GIT_STATUS_WT_NEW,
11385c3c
VM
49};
50
e9ca852e 51static const int entry_count0 = 16;
11385c3c 52
a56aacf4
RB
53/* entries for a copy of tests/resources/status with all content
54 * deleted from the working directory
55 */
56
57static const char *entry_paths2[] = {
58 "current_file",
59 "file_deleted",
60 "modified_file",
61 "staged_changes",
62 "staged_changes_file_deleted",
63 "staged_changes_modified_file",
64 "staged_delete_file_deleted",
65 "staged_delete_modified_file",
66 "staged_new_file",
67 "staged_new_file_deleted_file",
68 "staged_new_file_modified_file",
69 "subdir.txt",
70 "subdir/current_file",
71 "subdir/deleted_file",
72 "subdir/modified_file",
73};
74
75static const unsigned int entry_statuses2[] = {
76 GIT_STATUS_WT_DELETED,
77 GIT_STATUS_WT_DELETED,
78 GIT_STATUS_WT_DELETED,
79 GIT_STATUS_WT_DELETED | GIT_STATUS_INDEX_MODIFIED,
80 GIT_STATUS_WT_DELETED | GIT_STATUS_INDEX_MODIFIED,
81 GIT_STATUS_WT_DELETED | GIT_STATUS_INDEX_MODIFIED,
82 GIT_STATUS_INDEX_DELETED,
83 GIT_STATUS_INDEX_DELETED,
84 GIT_STATUS_WT_DELETED | GIT_STATUS_INDEX_NEW,
85 GIT_STATUS_WT_DELETED | GIT_STATUS_INDEX_NEW,
86 GIT_STATUS_WT_DELETED | GIT_STATUS_INDEX_NEW,
87 GIT_STATUS_WT_DELETED,
88 GIT_STATUS_WT_DELETED,
89 GIT_STATUS_WT_DELETED,
90 GIT_STATUS_WT_DELETED,
91};
92
e9ca852e 93static const int entry_count2 = 15;
a56aacf4
RB
94
95/* entries for a copy of tests/resources/status with some mods */
96
ec40b7f9
PK
97static const char *entry_paths3_icase[] = {
98 ".HEADER",
99 "42-is-not-prime.sigh",
100 "current_file",
101 "current_file/",
102 "file_deleted",
103 "ignored_file",
104 "modified_file",
105 "new_file",
106 "README.md",
107 "staged_changes",
108 "staged_changes_file_deleted",
109 "staged_changes_modified_file",
110 "staged_delete_file_deleted",
111 "staged_delete_modified_file",
112 "staged_new_file",
113 "staged_new_file_deleted_file",
114 "staged_new_file_modified_file",
115 "subdir",
116 "subdir/current_file",
117 "subdir/deleted_file",
118 "subdir/modified_file",
119 "\xe8\xbf\x99",
120};
121
122static const unsigned int entry_statuses3_icase[] = {
123 GIT_STATUS_WT_NEW,
124 GIT_STATUS_WT_NEW,
125 GIT_STATUS_WT_DELETED,
126 GIT_STATUS_WT_NEW,
127 GIT_STATUS_WT_DELETED,
128 GIT_STATUS_IGNORED,
129 GIT_STATUS_WT_MODIFIED,
130 GIT_STATUS_WT_NEW,
131 GIT_STATUS_WT_NEW,
132 GIT_STATUS_INDEX_MODIFIED,
133 GIT_STATUS_WT_DELETED | GIT_STATUS_INDEX_MODIFIED,
134 GIT_STATUS_WT_MODIFIED | GIT_STATUS_INDEX_MODIFIED,
135 GIT_STATUS_INDEX_DELETED,
136 GIT_STATUS_WT_NEW | GIT_STATUS_INDEX_DELETED,
137 GIT_STATUS_INDEX_NEW,
138 GIT_STATUS_WT_DELETED | GIT_STATUS_INDEX_NEW,
139 GIT_STATUS_WT_MODIFIED | GIT_STATUS_INDEX_NEW,
140 GIT_STATUS_WT_NEW,
141 GIT_STATUS_WT_DELETED,
142 GIT_STATUS_WT_DELETED,
143 GIT_STATUS_WT_DELETED,
144 GIT_STATUS_WT_NEW,
145};
146
a56aacf4
RB
147static const char *entry_paths3[] = {
148 ".HEADER",
149 "42-is-not-prime.sigh",
150 "README.md",
151 "current_file",
152 "current_file/",
153 "file_deleted",
154 "ignored_file",
155 "modified_file",
156 "new_file",
157 "staged_changes",
158 "staged_changes_file_deleted",
159 "staged_changes_modified_file",
160 "staged_delete_file_deleted",
161 "staged_delete_modified_file",
162 "staged_new_file",
163 "staged_new_file_deleted_file",
164 "staged_new_file_modified_file",
165 "subdir",
166 "subdir/current_file",
167 "subdir/deleted_file",
168 "subdir/modified_file",
8e60c712 169 "\xe8\xbf\x99",
a56aacf4
RB
170};
171
172static const unsigned int entry_statuses3[] = {
173 GIT_STATUS_WT_NEW,
174 GIT_STATUS_WT_NEW,
175 GIT_STATUS_WT_NEW,
176 GIT_STATUS_WT_DELETED,
177 GIT_STATUS_WT_NEW,
178 GIT_STATUS_WT_DELETED,
179 GIT_STATUS_IGNORED,
180 GIT_STATUS_WT_MODIFIED,
181 GIT_STATUS_WT_NEW,
182 GIT_STATUS_INDEX_MODIFIED,
183 GIT_STATUS_WT_DELETED | GIT_STATUS_INDEX_MODIFIED,
184 GIT_STATUS_WT_MODIFIED | GIT_STATUS_INDEX_MODIFIED,
185 GIT_STATUS_INDEX_DELETED,
186 GIT_STATUS_WT_NEW | GIT_STATUS_INDEX_DELETED,
187 GIT_STATUS_INDEX_NEW,
188 GIT_STATUS_WT_DELETED | GIT_STATUS_INDEX_NEW,
189 GIT_STATUS_WT_MODIFIED | GIT_STATUS_INDEX_NEW,
190 GIT_STATUS_WT_NEW,
191 GIT_STATUS_WT_DELETED,
192 GIT_STATUS_WT_DELETED,
193 GIT_STATUS_WT_DELETED,
8e60c712 194 GIT_STATUS_WT_NEW,
a56aacf4
RB
195};
196
e9ca852e 197static const int entry_count3 = 22;
4b136a94
RB
198
199
200/* entries for a copy of tests/resources/status with some mods
201 * and different options to the status call
202 */
203
204static const char *entry_paths4[] = {
205 ".new_file",
206 "current_file",
207 "current_file/current_file",
208 "current_file/modified_file",
209 "current_file/new_file",
210 "file_deleted",
211 "modified_file",
212 "new_file",
213 "staged_changes",
214 "staged_changes_file_deleted",
215 "staged_changes_modified_file",
216 "staged_delete_file_deleted",
217 "staged_delete_modified_file",
218 "staged_new_file",
219 "staged_new_file_deleted_file",
220 "staged_new_file_modified_file",
221 "subdir",
222 "subdir/current_file",
223 "subdir/deleted_file",
224 "subdir/modified_file",
225 "zzz_new_dir/new_file",
8e60c712
AR
226 "zzz_new_file",
227 "\xe8\xbf\x99",
4b136a94
RB
228};
229
230static const unsigned int entry_statuses4[] = {
231 GIT_STATUS_WT_NEW,
232 GIT_STATUS_WT_DELETED,
233 GIT_STATUS_WT_NEW,
234 GIT_STATUS_WT_NEW,
235 GIT_STATUS_WT_NEW,
236 GIT_STATUS_WT_DELETED,
237 GIT_STATUS_WT_MODIFIED,
238 GIT_STATUS_WT_NEW,
239 GIT_STATUS_INDEX_MODIFIED,
240 GIT_STATUS_WT_DELETED | GIT_STATUS_INDEX_MODIFIED,
241 GIT_STATUS_WT_MODIFIED | GIT_STATUS_INDEX_MODIFIED,
242 GIT_STATUS_INDEX_DELETED,
243 GIT_STATUS_WT_NEW | GIT_STATUS_INDEX_DELETED,
244 GIT_STATUS_INDEX_NEW,
245 GIT_STATUS_WT_DELETED | GIT_STATUS_INDEX_NEW,
246 GIT_STATUS_WT_MODIFIED | GIT_STATUS_INDEX_NEW,
247 GIT_STATUS_WT_NEW,
248 GIT_STATUS_WT_DELETED,
249 GIT_STATUS_WT_DELETED,
250 GIT_STATUS_WT_DELETED,
251 GIT_STATUS_WT_NEW,
252 GIT_STATUS_WT_NEW,
8e60c712 253 GIT_STATUS_WT_NEW,
4b136a94
RB
254};
255
e9ca852e 256static const int entry_count4 = 23;
9b6075b2 257
258
259/* entries for a copy of tests/resources/status with options
260 * passed to the status call in order to only get the differences
261 * between the HEAD and the index (changes to be committed)
262 */
263
264static const char *entry_paths5[] = {
265 "staged_changes",
266 "staged_changes_file_deleted",
267 "staged_changes_modified_file",
268 "staged_delete_file_deleted",
269 "staged_delete_modified_file",
270 "staged_new_file",
271 "staged_new_file_deleted_file",
272 "staged_new_file_modified_file",
273};
274
275static const unsigned int entry_statuses5[] = {
276 GIT_STATUS_INDEX_MODIFIED,
277 GIT_STATUS_INDEX_MODIFIED,
278 GIT_STATUS_INDEX_MODIFIED,
279 GIT_STATUS_INDEX_DELETED,
280 GIT_STATUS_INDEX_DELETED,
281 GIT_STATUS_INDEX_NEW,
282 GIT_STATUS_INDEX_NEW,
283 GIT_STATUS_INDEX_NEW,
284};
285
286static const int entry_count5 = 8;
287
288
289/* entries for a copy of tests/resources/status with options
290 * passed to the status call in order to only get the differences
291 * between the workdir and the index (changes not staged, untracked files)
292 */
293
294static const char *entry_paths6[] = {
295 "file_deleted",
296 "ignored_file",
297 "modified_file",
298 "new_file",
299 "staged_changes_file_deleted",
300 "staged_changes_modified_file",
301 "staged_delete_modified_file",
302 "staged_new_file_deleted_file",
303 "staged_new_file_modified_file",
304 "subdir/deleted_file",
305 "subdir/modified_file",
306 "subdir/new_file",
307 "\xe8\xbf\x99",
308};
309
310static const unsigned int entry_statuses6[] = {
311 GIT_STATUS_WT_DELETED,
312 GIT_STATUS_IGNORED,
313 GIT_STATUS_WT_MODIFIED,
314 GIT_STATUS_WT_NEW,
315 GIT_STATUS_WT_DELETED,
316 GIT_STATUS_WT_MODIFIED,
317 GIT_STATUS_WT_NEW,
318 GIT_STATUS_WT_DELETED,
319 GIT_STATUS_WT_MODIFIED,
320 GIT_STATUS_WT_DELETED,
321 GIT_STATUS_WT_MODIFIED,
322 GIT_STATUS_WT_NEW,
323 GIT_STATUS_WT_NEW,
324};
325
326static const int entry_count6 = 13;