1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2026-01-15 17:51:07 +00:00
uutils-coreutils/tests
Roy Ivy III 31655fc004 env: add support for new '--file' option (includes testing)
.# Discussion

This commit adds support for a '-f'/'--file' option which reads "KEY=VALUE" lines from
a config (or ini) style text file and sets the corresponding environment key. This is
modeled after the same option in the `dotenv` and `godotenv` commands. Notably, this
commit does *not* add automatic loading of ".env" configuration files.

The environment variables set by reading the configuration file are set prior to any
unset (eg, `-u BAR`) or set (eg, `FOO=bar`) actions. Files are loaded in order with
later files overwriting any overlapping environment variables, then, unset actions (in
command line order) are executed, then, finally, set actions (in command line order)
are executed.

[1] [`dotenv`](https://github.com/bkeepers/dotenv)
[2] [`godotenv`](https://github.com/joho/godotenv)
2019-04-29 09:50:22 -05:00
..
common augment UCommand with #[derive(Debug)] to allow improved test diagnostics 2019-04-29 09:46:15 -05:00
fixtures env: add support for new '--file' option (includes testing) 2019-04-29 09:50:22 -05:00
test_base32.rs Fix broken tests due to updating Cargo.lock 2017-11-18 17:52:28 -08:00
test_base64.rs Fix broken tests due to updating Cargo.lock 2017-11-18 17:52:28 -08:00
test_basename.rs tests: untrimmed stdout assertion (fix #1235) 2019-02-08 07:54:48 +11:00
test_cat.rs tests: untrimmed stdout assertion (fix #1235) 2019-02-08 07:54:48 +11:00
test_chgrp.rs fix ~ correct symlink creation in tests 2019-02-07 08:30:51 -06:00
test_chmod.rs chmod: make error message clearer 2017-12-08 20:54:59 +01:00
test_chown.rs tests: remove helper function boilerplate via macros 2016-08-23 08:04:02 -04:00
test_cksum.rs tests: remove helper function boilerplate via macros 2016-08-23 08:04:02 -04:00
test_comm.rs tests: remove helper function boilerplate via macros 2016-08-23 08:04:02 -04:00
test_cp.rs cp: add test for "cp always creates backup" 2019-02-07 08:22:41 -06:00
test_cut.rs tests: remove helper function boilerplate via macros 2016-08-23 08:04:02 -04:00
test_dircolors.rs tests: remove helper function boilerplate via macros 2016-08-23 08:04:02 -04:00
test_dirname.rs tests: untrimmed stdout assertion (fix #1235) 2019-02-08 07:54:48 +11:00
test_du.rs Fix issues raised in review 2018-03-24 18:03:34 -04:00
test_echo.rs echo: update tests to check for ending newlines 2019-04-05 22:27:25 -07:00
test_env.rs env: add support for new '--file' option (includes testing) 2019-04-29 09:50:22 -05:00
test_expr.rs Fix expr 2018-07-08 21:24:25 +01:00
test_factor.rs replace deprecated functions 2019-04-24 01:35:52 +02:00
test_false.rs tests: remove helper function boilerplate via macros 2016-08-23 08:04:02 -04:00
test_fold.rs tests: remove helper function boilerplate via macros 2016-08-23 08:04:02 -04:00
test_hashsum.rs hashsum: implement SHAKE-128 and SHAKE-256 2016-08-30 17:33:18 -07:00
test_head.rs tests: remove helper function boilerplate via macros 2016-08-23 08:04:02 -04:00
test_hostname.rs hostname: bug fix for non-windows xgethostname and add test case 2018-04-22 21:04:51 +08:00
test_install.rs install: allow to install a file to a file 2017-12-27 17:31:19 +09:00
test_join.rs tests: untrimmed stdout assertion (fix #1235) 2019-02-08 07:54:48 +11:00
test_link.rs tests: remove helper function boilerplate via macros 2016-08-23 08:04:02 -04:00
test_ln.rs fix ~ correct symlink creation in tests 2019-02-07 08:30:51 -06:00
test_ls.rs ls: implement -i option 2016-12-25 14:39:29 +09:00
test_mkdir.rs mkdir: Use std create_dir_all for recursive operations. 2018-05-01 12:42:11 +01:00
test_mktemp.rs tests: remove helper function boilerplate via macros 2016-08-23 08:04:02 -04:00
test_mv.rs mv: add test for "mv fails transfers between dirs" 2019-02-07 08:19:22 -06:00
test_nl.rs Fix clippy warnings 2016-11-25 14:14:46 -05:00
test_numfmt.rs tests: untrimmed stdout assertion (fix #1235) 2019-02-08 07:54:48 +11:00
test_od.rs Fix comment spelling 2016-11-25 14:36:56 -05:00
test_paste.rs tests: remove helper function boilerplate via macros 2016-08-23 08:04:02 -04:00
test_pathchk.rs tests: remove helper function boilerplate via macros 2016-08-23 08:04:02 -04:00
test_pinky.rs tests: untrimmed stdout assertion (fix #1235) 2019-02-08 07:54:48 +11:00
test_printf.rs tests: remove helper function boilerplate via macros 2016-08-23 08:04:02 -04:00
test_ptx.rs tests: remove helper function boilerplate via macros 2016-08-23 08:04:02 -04:00
test_pwd.rs tests: untrimmed stdout assertion (fix #1235) 2019-02-08 07:54:48 +11:00
test_readlink.rs tests: untrimmed stdout assertion (fix #1235) 2019-02-08 07:54:48 +11:00
test_realpath.rs tests: untrimmed stdout assertion (fix #1235) 2019-02-08 07:54:48 +11:00
test_rm.rs fix ~ correct symlink creation in tests 2019-02-07 08:30:51 -06:00
test_rmdir.rs tests: remove helper function boilerplate via macros 2016-08-23 08:04:02 -04:00
test_seq.rs tests: remove helper function boilerplate via macros 2016-08-23 08:04:02 -04:00
test_sort.rs sort: treat "NaN" as string in numeric sort 2018-09-03 22:28:18 -07:00
test_split.rs replace deprecated functions 2019-04-24 01:35:52 +02:00
test_stat.rs Don't assume tests are running on a computer with an English locale. 2018-04-22 08:07:38 +02:00
test_stdbuf.rs tests: remove helper function boilerplate via macros 2016-08-23 08:04:02 -04:00
test_sum.rs tests: remove helper function boilerplate via macros 2016-08-23 08:04:02 -04:00
test_tac.rs tests: remove helper function boilerplate via macros 2016-08-23 08:04:02 -04:00
test_tail.rs tail: suppress headers when --quiet flag is used 2017-10-05 21:25:21 +02:00
test_test.rs tests: remove helper function boilerplate via macros 2016-08-23 08:04:02 -04:00
test_touch.rs fix ~ correct symlink creation in tests 2019-02-07 08:30:51 -06:00
test_tr.rs tr: add truncate flag 2017-10-06 01:09:17 +02:00
test_true.rs tests: remove helper function boilerplate via macros 2016-08-23 08:04:02 -04:00
test_truncate.rs tests: remove helper function boilerplate via macros 2016-08-23 08:04:02 -04:00
test_tsort.rs Fix #1321 tsort handle self-loops 2019-02-14 07:45:11 +11:00
test_unexpand.rs tests: remove helper function boilerplate via macros 2016-08-23 08:04:02 -04:00
test_uniq.rs Fix broken tests due to updating Cargo.lock 2017-11-18 17:52:28 -08:00
test_unlink.rs tests: remove helper function boilerplate via macros 2016-08-23 08:04:02 -04:00
test_wc.rs tests: remove helper function boilerplate via macros 2016-08-23 08:04:02 -04:00
test_who.rs Don't assume tests are running on a computer with an English locale. 2018-04-22 08:07:38 +02:00
tests.rs Merge pull request #1319 from rivy/fix.touch 2019-04-08 15:16:26 -07:00