diff options
author | Matthew Bauer <mjbauer95@gmail.com> | 2020-07-30 16:37:44 -0500 |
---|---|---|
committer | Matthew Bauer <mjbauer95@gmail.com> | 2020-07-30 16:38:04 -0500 |
commit | 0bdd6cf6ea9bc9779c1767e3cf0207b0373b3b52 (patch) | |
tree | 02a1622e16a435d64633cd46ea0ba3732b97f5db /tests/filter-source.sh | |
parent | 0744f7f83bfaf82395b05a2e68cc86e46a82d1f0 (diff) |
Add test for builtins.path
Diffstat (limited to 'tests/filter-source.sh')
-rw-r--r-- | tests/filter-source.sh | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/tests/filter-source.sh b/tests/filter-source.sh index 1f8dceee5..ba34d2eac 100644 --- a/tests/filter-source.sh +++ b/tests/filter-source.sh @@ -10,10 +10,16 @@ touch $TEST_ROOT/filterin/bak touch $TEST_ROOT/filterin/bla.c.bak ln -s xyzzy $TEST_ROOT/filterin/link -nix-build ./filter-source.nix -o $TEST_ROOT/filterout +checkFilter() { + test ! -e $1/foo/bar + test -e $1/xyzzy + test -e $1/bak + test ! -e $1/bla.c.bak + test ! -L $1/link +} -test ! -e $TEST_ROOT/filterout/foo/bar -test -e $TEST_ROOT/filterout/xyzzy -test -e $TEST_ROOT/filterout/bak -test ! -e $TEST_ROOT/filterout/bla.c.bak -test ! -L $TEST_ROOT/filterout/link +nix-build ./filter-source.nix -o $TEST_ROOT/filterout1 +checkFilter $TEST_ROOT/filterout1 + +nix-build ./path.nix -o $TEST_ROOT/filterout2 +checkFilter $TEST_ROOT/filterout2 |