Debian Codegraph @

tests/tests.rs

raw
1 // This file is part of the uutils coreutils package.
2 //
3 // For the full copyright and license information, please view the LICENSE
4 // file that was distributed with this source code.
5
6 use std::env;
7
8 pub const TESTS_BINARY: &str = env!("CARGO_BIN_EXE_coreutils");
9
10 // Use the ctor attribute to run this function before any tests
11 #[ctor::ctor(unsafe)]
12 fn init() {
13 // Allow overriding the binary path (e.g. to test a WASI binary via wasmtime)
14 if env::var("UUTESTS_BINARY_PATH").is_err() {
15 unsafe {
16 env::set_var("UUTESTS_BINARY_PATH", TESTS_BINARY);
17 }
18 }
19 }
20
21 #[cfg(feature = "arch")]
22 #[path = "by-util/test_arch.rs"]
23 mod test_arch;
24
25 #[cfg(feature = "base32")]
26 #[path = "by-util/test_base32.rs"]
27 mod test_base32;
28
29 #[cfg(feature = "base64")]
30 #[path = "by-util/test_base64.rs"]
31 mod test_base64;
32
33 #[cfg(feature = "basename")]
34 #[path = "by-util/test_basename.rs"]
35 mod test_basename;
36
37 #[cfg(feature = "basenc")]
38 #[path = "by-util/test_basenc.rs"]
39 mod test_basenc;
40
41 #[cfg(feature = "cat")]
42 #[path = "by-util/test_cat.rs"]
43 mod test_cat;
44
45 #[cfg(feature = "chcon")]
46 #[path = "by-util/test_chcon.rs"]
47 mod test_chcon;
48
49 #[cfg(feature = "chgrp")]
50 #[path = "by-util/test_chgrp.rs"]
51 mod test_chgrp;
52
53 #[cfg(feature = "chmod")]
54 #[path = "by-util/test_chmod.rs"]
55 mod test_chmod;
56
57 #[cfg(feature = "chown")]
58 #[path = "by-util/test_chown.rs"]
59 mod test_chown;
60
61 #[cfg(feature = "chroot")]
62 #[path = "by-util/test_chroot.rs"]
63 mod test_chroot;
64
65 #[cfg(feature = "cksum")]
66 #[path = "by-util/test_cksum.rs"]
67 mod test_cksum;
68
69 #[cfg(feature = "comm")]
70 #[path = "by-util/test_comm.rs"]
71 mod test_comm;
72
73 #[cfg(feature = "b2sum")]
74 #[path = "by-util/test_b2sum.rs"]
75 mod test_b2sum;
76
77 #[cfg(feature = "md5sum")]
78 #[path = "by-util/test_md5sum.rs"]
79 mod test_md5sum;
80
81 #[cfg(feature = "sha1sum")]
82 #[path = "by-util/test_sha1sum.rs"]
83 mod test_sha1sum;
84
85 #[cfg(feature = "sha224sum")]
86 #[path = "by-util/test_sha224sum.rs"]
87 mod test_sha224sum;
88
89 #[cfg(feature = "sha256sum")]
90 #[path = "by-util/test_sha256sum.rs"]
91 mod test_sha256sum;
92
93 #[cfg(feature = "sha384sum")]
94 #[path = "by-util/test_sha384sum.rs"]
95 mod test_sha384sum;
96
97 #[cfg(feature = "sha512sum")]
98 #[path = "by-util/test_sha512sum.rs"]
99 mod test_sha512sum;
100
101 #[cfg(feature = "cp")]
102 #[path = "by-util/test_cp.rs"]
103 mod test_cp;
104
105 #[cfg(feature = "csplit")]
106 #[path = "by-util/test_csplit.rs"]
107 mod test_csplit;
108
109 #[cfg(feature = "cut")]
110 #[path = "by-util/test_cut.rs"]
111 mod test_cut;
112
113 #[cfg(feature = "date")]
114 #[path = "by-util/test_date.rs"]
115 mod test_date;
116
117 #[cfg(feature = "dd")]
118 #[path = "by-util/test_dd.rs"]
119 mod test_dd;
120
121 #[cfg(feature = "df")]
122 #[path = "by-util/test_df.rs"]
123 mod test_df;
124
125 #[cfg(feature = "dir")]
126 #[path = "by-util/test_dir.rs"]
127 mod test_dir;
128
129 #[cfg(feature = "dircolors")]
130 #[path = "by-util/test_dircolors.rs"]
131 mod test_dircolors;
132
133 #[cfg(feature = "dirname")]
134 #[path = "by-util/test_dirname.rs"]
135 mod test_dirname;
136
137 #[cfg(feature = "du")]
138 #[path = "by-util/test_du.rs"]
139 mod test_du;
140
141 #[cfg(feature = "echo")]
142 #[path = "by-util/test_echo.rs"]
143 mod test_echo;
144
145 #[cfg(feature = "env")]
146 #[path = "by-util/test_env.rs"]
147 mod test_env;
148
149 #[cfg(feature = "expand")]
150 #[path = "by-util/test_expand.rs"]
151 mod test_expand;
152
153 #[cfg(feature = "expr")]
154 #[path = "by-util/test_expr.rs"]
155 mod test_expr;
156
157 #[cfg(feature = "factor")]
158 #[path = "by-util/test_factor.rs"]
159 mod test_factor;
160
161 #[cfg(feature = "false")]
162 #[path = "by-util/test_false.rs"]
163 mod test_false;
164
165 #[cfg(feature = "fmt")]
166 #[path = "by-util/test_fmt.rs"]
167 mod test_fmt;
168
169 #[cfg(feature = "fold")]
170 #[path = "by-util/test_fold.rs"]
171 mod test_fold;
172
173 #[cfg(feature = "groups")]
174 #[path = "by-util/test_groups.rs"]
175 mod test_groups;
176
177 #[cfg(feature = "head")]
178 #[path = "by-util/test_head.rs"]
179 mod test_head;
180
181 #[cfg(feature = "hostid")]
182 #[path = "by-util/test_hostid.rs"]
183 mod test_hostid;
184
185 #[cfg(feature = "hostname")]
186 #[path = "by-util/test_hostname.rs"]
187 mod test_hostname;
188
189 #[cfg(feature = "id")]
190 #[path = "by-util/test_id.rs"]
191 mod test_id;
192
193 #[cfg(feature = "install")]
194 #[path = "by-util/test_install.rs"]
195 mod test_install;
196
197 #[cfg(feature = "join")]
198 #[path = "by-util/test_join.rs"]
199 mod test_join;
200
201 #[cfg(feature = "kill")]
202 #[path = "by-util/test_kill.rs"]
203 mod test_kill;
204
205 #[cfg(feature = "link")]
206 #[path = "by-util/test_link.rs"]
207 mod test_link;
208
209 #[cfg(feature = "ln")]
210 #[path = "by-util/test_ln.rs"]
211 mod test_ln;
212
213 #[cfg(feature = "logname")]
214 #[path = "by-util/test_logname.rs"]
215 mod test_logname;
216
217 #[cfg(feature = "ls")]
218 #[path = "by-util/test_ls.rs"]
219 mod test_ls;
220
221 #[cfg(feature = "mkdir")]
222 #[path = "by-util/test_mkdir.rs"]
223 mod test_mkdir;
224
225 #[cfg(feature = "mkfifo")]
226 #[path = "by-util/test_mkfifo.rs"]
227 mod test_mkfifo;
228
229 #[cfg(feature = "mknod")]
230 #[path = "by-util/test_mknod.rs"]
231 mod test_mknod;
232
233 #[cfg(feature = "mktemp")]
234 #[path = "by-util/test_mktemp.rs"]
235 mod test_mktemp;
236
237 #[cfg(feature = "more")]
238 #[path = "by-util/test_more.rs"]
239 mod test_more;
240
241 #[cfg(feature = "mv")]
242 #[path = "by-util/test_mv.rs"]
243 mod test_mv;
244
245 #[cfg(feature = "nice")]
246 #[path = "by-util/test_nice.rs"]
247 mod test_nice;
248
249 #[cfg(feature = "nl")]
250 #[path = "by-util/test_nl.rs"]
251 mod test_nl;
252
253 #[cfg(feature = "nohup")]
254 #[path = "by-util/test_nohup.rs"]
255 mod test_nohup;
256
257 #[cfg(feature = "nproc")]
258 #[path = "by-util/test_nproc.rs"]
259 mod test_nproc;
260
261 #[cfg(feature = "numfmt")]
262 #[path = "by-util/test_numfmt.rs"]
263 mod test_numfmt;
264
265 #[cfg(feature = "od")]
266 #[path = "by-util/test_od.rs"]
267 mod test_od;
268
269 #[cfg(feature = "paste")]
270 #[path = "by-util/test_paste.rs"]
271 mod test_paste;
272
273 #[cfg(feature = "pathchk")]
274 #[path = "by-util/test_pathchk.rs"]
275 mod test_pathchk;
276
277 #[cfg(feature = "pinky")]
278 #[path = "by-util/test_pinky.rs"]
279 mod test_pinky;
280
281 #[cfg(feature = "pr")]
282 #[path = "by-util/test_pr.rs"]
283 mod test_pr;
284
285 #[cfg(feature = "printenv")]
286 #[path = "by-util/test_printenv.rs"]
287 mod test_printenv;
288
289 #[cfg(feature = "printf")]
290 #[path = "by-util/test_printf.rs"]
291 mod test_printf;
292
293 #[cfg(feature = "ptx")]
294 #[path = "by-util/test_ptx.rs"]
295 mod test_ptx;
296
297 #[cfg(feature = "pwd")]
298 #[path = "by-util/test_pwd.rs"]
299 mod test_pwd;
300
301 #[cfg(feature = "readlink")]
302 #[path = "by-util/test_readlink.rs"]
303 mod test_readlink;
304
305 #[cfg(feature = "realpath")]
306 #[path = "by-util/test_realpath.rs"]
307 mod test_realpath;
308
309 #[cfg(feature = "rm")]
310 #[path = "by-util/test_rm.rs"]
311 mod test_rm;
312
313 #[cfg(feature = "rmdir")]
314 #[path = "by-util/test_rmdir.rs"]
315 mod test_rmdir;
316
317 #[cfg(feature = "runcon")]
318 #[path = "by-util/test_runcon.rs"]
319 mod test_runcon;
320
321 #[cfg(feature = "seq")]
322 #[path = "by-util/test_seq.rs"]
323 mod test_seq;
324
325 #[cfg(feature = "shred")]
326 #[path = "by-util/test_shred.rs"]
327 mod test_shred;
328
329 #[cfg(feature = "shuf")]
330 #[path = "by-util/test_shuf.rs"]
331 mod test_shuf;
332
333 #[cfg(feature = "sleep")]
334 #[path = "by-util/test_sleep.rs"]
335 mod test_sleep;
336
337 #[cfg(feature = "sort")]
338 #[path = "by-util/test_sort.rs"]
339 mod test_sort;
340
341 #[cfg(feature = "split")]
342 #[path = "by-util/test_split.rs"]
343 mod test_split;
344
345 #[cfg(feature = "stat")]
346 #[path = "by-util/test_stat.rs"]
347 mod test_stat;
348
349 #[cfg(feature = "stdbuf")]
350 #[path = "by-util/test_stdbuf.rs"]
351 mod test_stdbuf;
352
353 #[cfg(feature = "stty")]
354 #[path = "by-util/test_stty.rs"]
355 mod test_stty;
356
357 #[cfg(feature = "sum")]
358 #[path = "by-util/test_sum.rs"]
359 mod test_sum;
360
361 #[cfg(feature = "sync")]
362 #[path = "by-util/test_sync.rs"]
363 mod test_sync;
364
365 #[cfg(feature = "tac")]
366 #[path = "by-util/test_tac.rs"]
367 mod test_tac;
368
369 #[cfg(feature = "tail")]
370 #[path = "by-util/test_tail.rs"]
371 mod test_tail;
372
373 #[cfg(feature = "tee")]
374 #[path = "by-util/test_tee.rs"]
375 mod test_tee;
376
377 #[cfg(feature = "test")]
378 #[path = "by-util/test_test.rs"]
379 mod test_test;
380
381 #[cfg(feature = "timeout")]
382 #[path = "by-util/test_timeout.rs"]
383 mod test_timeout;
384
385 #[cfg(feature = "touch")]
386 #[path = "by-util/test_touch.rs"]
387 mod test_touch;
388
389 #[cfg(feature = "tr")]
390 #[path = "by-util/test_tr.rs"]
391 mod test_tr;
392
393 #[cfg(feature = "true")]
394 #[path = "by-util/test_true.rs"]
395 mod test_true;
396
397 #[cfg(feature = "truncate")]
398 #[path = "by-util/test_truncate.rs"]
399 mod test_truncate;
400
401 #[cfg(feature = "tsort")]
402 #[path = "by-util/test_tsort.rs"]
403 mod test_tsort;
404
405 #[cfg(feature = "tty")]
406 #[path = "by-util/test_tty.rs"]
407 mod test_tty;
408
409 #[cfg(feature = "uname")]
410 #[path = "by-util/test_uname.rs"]
411 mod test_uname;
412
413 #[cfg(feature = "unexpand")]
414 #[path = "by-util/test_unexpand.rs"]
415 mod test_unexpand;
416
417 #[cfg(feature = "uniq")]
418 #[path = "by-util/test_uniq.rs"]
419 mod test_uniq;
420
421 #[cfg(feature = "unlink")]
422 #[path = "by-util/test_unlink.rs"]
423 mod test_unlink;
424
425 #[cfg(feature = "uptime")]
426 #[path = "by-util/test_uptime.rs"]
427 mod test_uptime;
428
429 #[cfg(feature = "uudoc")]
430 #[path = "uudoc/mod.rs"]
431 mod test_uudoc;
432
433 #[cfg(feature = "users")]
434 #[path = "by-util/test_users.rs"]
435 mod test_users;
436
437 #[cfg(feature = "vdir")]
438 #[path = "by-util/test_vdir.rs"]
439 mod test_vdir;
440
441 #[cfg(feature = "wc")]
442 #[path = "by-util/test_wc.rs"]
443 mod test_wc;
444
445 #[cfg(feature = "who")]
446 #[path = "by-util/test_who.rs"]
447 mod test_who;
448
449 #[cfg(feature = "whoami")]
450 #[path = "by-util/test_whoami.rs"]
451 mod test_whoami;
452
453 #[cfg(feature = "yes")]
454 #[path = "by-util/test_yes.rs"]
455 mod test_yes;