2016-05-22 07:46:54 +00:00
|
|
|
#[macro_use]
|
|
|
|
mod common;
|
|
|
|
|
2020-01-30 00:07:16 +00:00
|
|
|
// [warning fix]; from ref: <https://github.com/rust-lang/rust-clippy/issues/1938#issuecomment-374816813>
|
|
|
|
#[cfg_attr(feature = "cargo-clippy", allow(useless_attribute))]
|
|
|
|
#[allow(unused_imports)]
|
2018-09-03 22:45:58 +00:00
|
|
|
#[cfg(unix)]
|
2016-12-19 10:02:58 +00:00
|
|
|
#[macro_use]
|
|
|
|
extern crate lazy_static;
|
|
|
|
|
2018-03-02 07:08:09 +00:00
|
|
|
#[cfg(unix)]
|
|
|
|
extern crate rust_users;
|
|
|
|
|
2016-06-12 07:02:05 +00:00
|
|
|
// For conditional compilation
|
|
|
|
macro_rules! unix_only {
|
|
|
|
($($fea:expr, $m:ident);+) => {
|
|
|
|
$(
|
|
|
|
#[cfg(unix)]
|
|
|
|
#[cfg(feature = $fea)]
|
|
|
|
mod $m;
|
|
|
|
)+
|
|
|
|
};
|
|
|
|
}
|
|
|
|
unix_only! {
|
|
|
|
"chmod", test_chmod;
|
2016-06-22 13:39:46 +00:00
|
|
|
"chown", test_chown;
|
2016-08-21 09:05:05 +00:00
|
|
|
"chgrp", test_chgrp;
|
2016-07-12 18:56:21 +00:00
|
|
|
"install", test_install;
|
2016-06-12 07:02:05 +00:00
|
|
|
"pathchk", test_pathchk;
|
2016-07-26 08:43:25 +00:00
|
|
|
"pinky", test_pinky;
|
2016-06-12 07:02:05 +00:00
|
|
|
"stdbuf", test_stdbuf;
|
2020-04-30 22:24:06 +00:00
|
|
|
"uname", test_uname;
|
2016-06-12 07:02:05 +00:00
|
|
|
"unlink", test_unlink;
|
2020-05-15 22:14:54 +00:00
|
|
|
"uptime", test_uptime;
|
2020-05-03 20:38:46 +00:00
|
|
|
"users", test_users;
|
2016-08-11 07:37:39 +00:00
|
|
|
"who", test_who;
|
2016-06-12 07:02:05 +00:00
|
|
|
// Be aware of the trailing semicolon after the last item
|
|
|
|
"stat", test_stat
|
|
|
|
}
|
2016-05-22 07:46:54 +00:00
|
|
|
|
2016-06-12 07:02:05 +00:00
|
|
|
macro_rules! generic {
|
|
|
|
($($fea:expr, $m:ident);+) => {
|
|
|
|
$(
|
|
|
|
#[cfg(feature = $fea)]
|
|
|
|
mod $m;
|
|
|
|
)+
|
|
|
|
};
|
|
|
|
}
|
|
|
|
generic! {
|
2020-05-05 21:08:58 +00:00
|
|
|
"arch", test_arch;
|
2016-08-06 03:46:39 +00:00
|
|
|
"base32", test_base32;
|
2016-06-12 07:02:05 +00:00
|
|
|
"base64", test_base64;
|
|
|
|
"basename", test_basename;
|
|
|
|
"cat", test_cat;
|
|
|
|
"cksum", test_cksum;
|
|
|
|
"comm", test_comm;
|
|
|
|
"cp", test_cp;
|
|
|
|
"cut", test_cut;
|
2020-05-01 23:03:01 +00:00
|
|
|
"date", test_date;
|
2016-06-12 07:02:05 +00:00
|
|
|
"dircolors", test_dircolors;
|
|
|
|
"dirname", test_dirname;
|
2020-04-28 07:34:55 +00:00
|
|
|
"df", test_df;
|
2018-03-20 16:10:05 +00:00
|
|
|
"du", test_du;
|
2016-06-12 07:02:05 +00:00
|
|
|
"echo", test_echo;
|
|
|
|
"env", test_env;
|
2020-05-15 12:21:23 +00:00
|
|
|
"expand", test_expand;
|
2016-06-12 07:02:05 +00:00
|
|
|
"expr", test_expr;
|
|
|
|
"factor", test_factor;
|
|
|
|
"false", test_false;
|
2020-05-05 21:15:50 +00:00
|
|
|
"fmt", test_fmt;
|
2016-06-12 07:02:05 +00:00
|
|
|
"fold", test_fold;
|
|
|
|
"hashsum", test_hashsum;
|
|
|
|
"head", test_head;
|
2020-05-07 23:01:47 +00:00
|
|
|
"id", test_id;
|
2017-12-13 21:02:42 +00:00
|
|
|
"join", test_join;
|
2016-06-12 07:02:05 +00:00
|
|
|
"link", test_link;
|
|
|
|
"ln", test_ln;
|
|
|
|
"ls", test_ls;
|
|
|
|
"mkdir", test_mkdir;
|
|
|
|
"mktemp", test_mktemp;
|
2020-05-11 08:44:12 +00:00
|
|
|
"more", test_more;
|
2018-09-23 04:29:18 +00:00
|
|
|
"mv", test_mv;
|
2017-10-22 07:57:49 +00:00
|
|
|
"numfmt", test_numfmt;
|
2016-06-12 07:02:05 +00:00
|
|
|
"nl", test_nl;
|
|
|
|
"od", test_od;
|
|
|
|
"paste", test_paste;
|
2020-05-02 14:54:29 +00:00
|
|
|
"printenv", test_printenv;
|
2016-06-12 07:02:05 +00:00
|
|
|
"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;
|
2018-11-25 09:00:19 +00:00
|
|
|
"touch", test_touch;
|
2016-06-12 07:02:05 +00:00
|
|
|
"tr", test_tr;
|
|
|
|
"true", test_true;
|
|
|
|
"truncate", test_truncate;
|
|
|
|
"tsort", test_tsort;
|
|
|
|
"unexpand", test_unexpand;
|
|
|
|
"uniq", test_uniq;
|
2018-04-19 13:20:23 +00:00
|
|
|
"wc", test_wc;
|
2020-05-15 12:19:40 +00:00
|
|
|
"whoami", test_whoami;
|
2016-06-12 07:02:05 +00:00
|
|
|
// Be aware of the trailing semicolon after the last item
|
2018-04-19 13:20:23 +00:00
|
|
|
"hostname", test_hostname
|
2016-06-12 07:02:05 +00:00
|
|
|
}
|