1
0
Fork 0
mirror of synced 2024-11-17 06:45:33 -05:00
yadm/test/101_accept_help.bats
Tim Byrne d2cd3b1b26 Add tests
Tests will be run using `bats`.
2016-04-07 08:14:13 -05:00

32 lines
560 B
Bash

load common
load_fixtures
@test "Missing command" {
echo "
When no command is provided,
Produce usage instructions
Exit with 1
"
#; run yadm with no command
run $T_YADM
#; validate status and output
[ $status -eq 1 ]
[[ "${lines[0]}" =~ ^Usage: ]]
}
@test "Command 'help'" {
echo "
When 'help' command is provided,
Produce usage instructions
Exit with value 1
"
#; run yadm with 'help' command
run $T_YADM help
#; validate status and output
[ $status -eq 1 ]
[[ "${lines[0]}" =~ ^Usage: ]]
}