Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .trunk/configs/.yamllint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ ignore: |
.travis.yml

rules:
comments:
min-spaces-from-content: 1
document-start: disable
line-length: disable
truthy:
Expand Down
1 change: 0 additions & 1 deletion src/commands/init.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ function _zunit_init_usage() {
echo
echo "$(color yellow 'Options:')"
echo " -h, --help Output help text and exit"
echo " -v, --version Output version information and exit"
echo " -g, --github-actions Generate .github/workflows/zunit.yml in project"
echo " -t, --travis Generate legacy .travis.yml in project"
}
Expand Down
12 changes: 11 additions & 1 deletion tests/cli.zunit
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,19 @@
}

@test 'report output without config points users to zunit init' {
local sandbox
local sandbox stubbin
sandbox="$(mktemp -d)"
stubbin="$sandbox/.bin"

mkdir -p "$stubbin"
print -r -- '#!/usr/bin/env zsh' > "$stubbin/revolver"
print -r -- 'exit 0' >> "$stubbin/revolver"
print -r -- '#!/usr/bin/env zsh' > "$stubbin/color"
print -r -- 'print -r -- "${@: -1}"' >> "$stubbin/color"
chmod u+x "$stubbin/revolver" "$stubbin/color"

cd "$sandbox"
PATH="$stubbin:/usr/bin:/bin"
run "$OLDPWD/zunit" --output-text

assert "$state" equals 1
Expand All @@ -50,6 +59,7 @@

assert "$state" equals 0
assert "$output" contains '--github-actions'
assert "$output" does_not_contain '--version'
}

@test 'init can generate GitHub Actions workflow' {
Expand Down
Loading