mirror of
https://github.com/devvmhq/devvm.git
synced 2026-12-01 21:36:40 -10:00
38 lines
998 B
Plaintext
38 lines
998 B
Plaintext
# devvm --help prints usage.
|
|
exec devvm --help
|
|
stdout '^Usage:'
|
|
stdout 'devvm \[IMAGE\] \[flags\]'
|
|
! stderr .
|
|
cp stdout help.txt
|
|
|
|
# So do devvm help and -h; devvm help COMMAND prints the command's.
|
|
exec devvm help
|
|
cmp stdout help.txt
|
|
exec devvm -h
|
|
cmp stdout help.txt
|
|
exec devvm help build
|
|
stdout 'devvm build IMAGE \[flags\]'
|
|
exec devvm build --help
|
|
stdout 'devvm build IMAGE \[flags\]'
|
|
! stub_calls
|
|
|
|
# An unknown flag fails in one line on stderr, like every error.
|
|
! exec devvm --nope
|
|
cmp stderr nope-flag.txt
|
|
! stdout .
|
|
|
|
# So does a command given too many arguments.
|
|
! exec devvm build a b
|
|
cmp stderr build-args.txt
|
|
! stdout .
|
|
|
|
# In names mode, the parser's error is the message's value.
|
|
env DEVVM_MESSAGES=names
|
|
! exec devvm --nope
|
|
stderr '^devvm: usage_error reason=unknown flag: --nope$'
|
|
|
|
-- nope-flag.txt --
|
|
devvm: unknown flag: --nope. Run devvm --help to see the commands and flags.
|
|
-- build-args.txt --
|
|
devvm: accepts 1 arg(s), received 2. Run devvm --help to see the commands and flags.
|