mirror of
https://github.com/TheLocehiliosan/yadm
synced 2024-10-27 20:34:27 +00:00
34 lines
605 B
Bash
34 lines
605 B
Bash
load common
|
|
load_fixtures
|
|
status=;lines=; #; populated by bats run()
|
|
|
|
@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: ]]
|
|
}
|