Skip to content

Commit

Permalink
tests/config: test retrieving a single setting's value with `nix show…
Browse files Browse the repository at this point in the history
…-config <setting>`
  • Loading branch information
cole-h authored and iFreilicht committed Jan 28, 2023
1 parent e1bace1 commit 37120f4
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions tests/config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -51,3 +51,8 @@ exp_features=$(nix show-config | grep '^experimental-features' | cut -d '=' -f 2
[[ $prev != $exp_cores ]]
[[ $exp_cores == "4242" ]]
[[ $exp_features == "flakes nix-command" ]]

# Test that it's possible to retrieve a single setting's value
val=$(nix show-config | grep '^warn-dirty' | cut -d '=' -f 2 | xargs)
val2=$(nix show-config warn-dirty)
[[ $val == $val2 ]]

0 comments on commit 37120f4

Please sign in to comment.