2016-03-23 20:18:33 -04:00
|
|
|
load common
|
|
|
|
load_fixtures
|
2016-04-06 13:33:42 -04:00
|
|
|
status=;lines=; #; populated by bats run()
|
2016-03-23 20:18:33 -04:00
|
|
|
|
|
|
|
@test "Command 'clean'" {
|
|
|
|
echo "
|
|
|
|
When 'clean' command is provided,
|
|
|
|
Do nothing, this is a dangerous Git command when managing dot files
|
|
|
|
Report the command as disabled
|
|
|
|
Exit with 1
|
|
|
|
"
|
|
|
|
|
|
|
|
#; run yadm with 'clean' command
|
2016-04-06 13:33:42 -04:00
|
|
|
run "$T_YADM" clean
|
2016-03-23 20:18:33 -04:00
|
|
|
|
|
|
|
#; validate status and output
|
|
|
|
[ $status -eq 1 ]
|
|
|
|
[[ "${lines[0]}" =~ disabled ]]
|
|
|
|
}
|