mirror of
https://github.com/NixOS/nix
synced 2025-06-25 10:41:16 +02:00
Run the 'nix --help' tests early
These don't depend on 'man' so we don't need to skip them.
This commit is contained in:
parent
e0c6ed1c83
commit
2dae5acf86
1 changed files with 19 additions and 19 deletions
|
@ -2,6 +2,25 @@
|
||||||
|
|
||||||
source common.sh
|
source common.sh
|
||||||
|
|
||||||
|
function subcommands() {
|
||||||
|
jq -r '
|
||||||
|
def recurse($prefix):
|
||||||
|
to_entries[] |
|
||||||
|
($prefix + [.key]) as $newPrefix |
|
||||||
|
(if .value | has("commands") then
|
||||||
|
($newPrefix, (.value.commands | recurse($newPrefix)))
|
||||||
|
else
|
||||||
|
$newPrefix
|
||||||
|
end);
|
||||||
|
.args.commands | recurse([]) | join(" ")
|
||||||
|
'
|
||||||
|
}
|
||||||
|
|
||||||
|
nix __dump-cli | subcommands | while IFS= read -r cmd; do
|
||||||
|
# shellcheck disable=SC2086 # word splitting of cmd is intended
|
||||||
|
nix $cmd --help
|
||||||
|
done
|
||||||
|
|
||||||
[[ $(type -p man) ]] || skipTest "'man' not installed"
|
[[ $(type -p man) ]] || skipTest "'man' not installed"
|
||||||
|
|
||||||
# test help output
|
# test help output
|
||||||
|
@ -51,22 +70,3 @@ nix-daemon --help
|
||||||
nix-hash --help
|
nix-hash --help
|
||||||
nix-instantiate --help
|
nix-instantiate --help
|
||||||
nix-prefetch-url --help
|
nix-prefetch-url --help
|
||||||
|
|
||||||
function subcommands() {
|
|
||||||
jq -r '
|
|
||||||
def recurse($prefix):
|
|
||||||
to_entries[] |
|
|
||||||
($prefix + [.key]) as $newPrefix |
|
|
||||||
(if .value | has("commands") then
|
|
||||||
($newPrefix, (.value.commands | recurse($newPrefix)))
|
|
||||||
else
|
|
||||||
$newPrefix
|
|
||||||
end);
|
|
||||||
.args.commands | recurse([]) | join(" ")
|
|
||||||
'
|
|
||||||
}
|
|
||||||
|
|
||||||
nix __dump-cli | subcommands | while IFS= read -r cmd; do
|
|
||||||
# shellcheck disable=SC2086 # word splitting of cmd is intended
|
|
||||||
nix $cmd --help
|
|
||||||
done
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue