2
0
mirror of https://github.com/kazhala/dotbare synced 2024-11-04 06:00:45 +00:00
dotbare/tests/flog.bats

22 lines
403 B
Plaintext
Raw Normal View History

2020-05-13 03:41:58 +00:00
#!/usr/bin/env bats
help() {
bash "${BATS_TEST_DIRNAME}"/../dotbare flog -h
}
invalid_option() {
bash "${BATS_TEST_DIRNAME}"/../dotbare flog -p
}
@test "flog help" {
run help
[ "${status}" -eq 0 ]
2020-05-13 03:52:28 +00:00
[ "${lines[0]}" = "Usage: dotbare flog [-h] [-r] [-R] [-e] [-c] ..." ]
2020-05-13 03:41:58 +00:00
}
@test "flog invalid option" {
run invalid_option
[ "${status}" -eq 1 ]
[ "${lines[0]}" = "Invalid option: p" ]
}