mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-27 11:07:44 +00:00
tests ~ use build.rs build list of test_UTIL module files
This commit is contained in:
parent
413b63bf5f
commit
ebb2c3dfb4
1 changed files with 1 additions and 100 deletions
101
tests/tests.rs
101
tests/tests.rs
|
@ -9,103 +9,4 @@ extern crate lazy_static;
|
||||||
#[cfg(unix)]
|
#[cfg(unix)]
|
||||||
extern crate rust_users;
|
extern crate rust_users;
|
||||||
|
|
||||||
// For conditional compilation
|
include!(concat!(env!("OUT_DIR"), "/test_modules.rs"));
|
||||||
macro_rules! unix_only {
|
|
||||||
($($fea:expr, $m:ident);+) => {
|
|
||||||
$(
|
|
||||||
#[cfg(unix)]
|
|
||||||
#[cfg(feature = $fea)]
|
|
||||||
mod $m;
|
|
||||||
)+
|
|
||||||
};
|
|
||||||
}
|
|
||||||
unix_only! {
|
|
||||||
"chmod", test_chmod;
|
|
||||||
"chown", test_chown;
|
|
||||||
"chgrp", test_chgrp;
|
|
||||||
"install", test_install;
|
|
||||||
"pathchk", test_pathchk;
|
|
||||||
"pinky", test_pinky;
|
|
||||||
"stdbuf", test_stdbuf;
|
|
||||||
"uname", test_uname;
|
|
||||||
"unlink", test_unlink;
|
|
||||||
"uptime", test_uptime;
|
|
||||||
"users", test_users;
|
|
||||||
"who", test_who;
|
|
||||||
// Be aware of the trailing semicolon after the last item
|
|
||||||
"stat", test_stat
|
|
||||||
}
|
|
||||||
|
|
||||||
macro_rules! generic {
|
|
||||||
($($fea:expr, $m:ident);+) => {
|
|
||||||
$(
|
|
||||||
#[cfg(feature = $fea)]
|
|
||||||
mod $m;
|
|
||||||
)+
|
|
||||||
};
|
|
||||||
}
|
|
||||||
generic! {
|
|
||||||
"arch", test_arch;
|
|
||||||
"base32", test_base32;
|
|
||||||
"base64", test_base64;
|
|
||||||
"basename", test_basename;
|
|
||||||
"cat", test_cat;
|
|
||||||
"cksum", test_cksum;
|
|
||||||
"comm", test_comm;
|
|
||||||
"cp", test_cp;
|
|
||||||
"cut", test_cut;
|
|
||||||
"date", test_date;
|
|
||||||
"dircolors", test_dircolors;
|
|
||||||
"dirname", test_dirname;
|
|
||||||
"df", test_df;
|
|
||||||
"du", test_du;
|
|
||||||
"echo", test_echo;
|
|
||||||
"env", test_env;
|
|
||||||
"expand", test_expand;
|
|
||||||
"expr", test_expr;
|
|
||||||
"factor", test_factor;
|
|
||||||
"false", test_false;
|
|
||||||
"fmt", test_fmt;
|
|
||||||
"fold", test_fold;
|
|
||||||
"hashsum", test_hashsum;
|
|
||||||
"head", test_head;
|
|
||||||
"id", test_id;
|
|
||||||
"join", test_join;
|
|
||||||
"link", test_link;
|
|
||||||
"ln", test_ln;
|
|
||||||
"ls", test_ls;
|
|
||||||
"mkdir", test_mkdir;
|
|
||||||
"mktemp", test_mktemp;
|
|
||||||
"more", test_more;
|
|
||||||
"mv", test_mv;
|
|
||||||
"numfmt", test_numfmt;
|
|
||||||
"nl", test_nl;
|
|
||||||
"od", test_od;
|
|
||||||
"paste", test_paste;
|
|
||||||
"printenv", test_printenv;
|
|
||||||
"printf", test_printf;
|
|
||||||
"ptx", test_ptx;
|
|
||||||
"pwd", test_pwd;
|
|
||||||
"readlink", test_readlink;
|
|
||||||
"realpath", test_realpath;
|
|
||||||
"rm", test_rm;
|
|
||||||
"rmdir", test_rmdir;
|
|
||||||
"seq", test_seq;
|
|
||||||
"sort", test_sort;
|
|
||||||
"split", test_split;
|
|
||||||
"sum", test_sum;
|
|
||||||
"tac", test_tac;
|
|
||||||
"tail", test_tail;
|
|
||||||
"test", test_test;
|
|
||||||
"touch", test_touch;
|
|
||||||
"tr", test_tr;
|
|
||||||
"true", test_true;
|
|
||||||
"truncate", test_truncate;
|
|
||||||
"tsort", test_tsort;
|
|
||||||
"unexpand", test_unexpand;
|
|
||||||
"uniq", test_uniq;
|
|
||||||
"wc", test_wc;
|
|
||||||
"whoami", test_whoami;
|
|
||||||
// Be aware of the trailing semicolon after the last item
|
|
||||||
"hostname", test_hostname
|
|
||||||
}
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue