diff options
author | Cole Helbling <cole.e.helbling@outlook.com> | 2024-05-14 12:13:40 -0700 |
---|---|---|
committer | Maximilian Bosch <maximilian@mbosch.me> | 2024-05-30 03:07:21 +0000 |
commit | 031d92411637904a8ed759dc80bc474213dd4fa9 (patch) | |
tree | b01c2401c71daeb868dbc8996dc34eb3482a4178 /tests/functional/eval.sh | |
parent | 218630a241d71ea5c136f72e1aaaf2299df6a0b1 (diff) |
libutil/args: warn on unknown settings after parsing all flags
Upstream change: https://github.com/NixOS/nix/pull/10701
Change-Id: Icf271df57ec529dd8c64667d1ef9f6dbf02d33d3
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 ]] |