diff options
author | Maximilian Bosch <maximilian@mbosch.me> | 2024-05-30 09:24:14 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@lix-systems> | 2024-05-30 09:24:14 +0000 |
commit | ce82067566a18fcd77ef1fe2f2575921fcceb665 (patch) | |
tree | be89f481be4b0bd12898d0b0c72d5390de5198c5 /tests/functional/eval.sh | |
parent | 2760818f062b6810da6766639c543aeb1db45522 (diff) | |
parent | 031d92411637904a8ed759dc80bc474213dd4fa9 (diff) |
Merge "libutil/args: warn on unknown settings after parsing all flags" into main
Diffstat (limited to 'tests/functional/eval.sh')
-rw-r--r-- | tests/functional/eval.sh | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/functional/eval.sh b/tests/functional/eval.sh index 2b34caddb..9c125b569 100644 --- a/tests/functional/eval.sh +++ b/tests/functional/eval.sh @@ -51,3 +51,7 @@ mkdir -p $TEST_ROOT/xyzzy $TEST_ROOT/foo ln -sfn ../xyzzy $TEST_ROOT/foo/bar printf 123 > $TEST_ROOT/xyzzy/default.nix [[ $(nix eval --impure --expr "import $TEST_ROOT/foo/bar") = 123 ]] + +# Test that unknown settings are warned about +out="$(expectStderr 0 nix eval --option foobar baz --expr '""' --raw)" +[[ "$(echo "$out" | grep foobar | wc -l)" = 1 ]] |