mirror of https://github.com/kazhala/dotbare
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
31 lines
530 B
Bash
31 lines
530 B
Bash
#!/usr/bin/env bats
|
|
|
|
help() {
|
|
bash "${BATS_TEST_DIRNAME}"/../dotbare fstat -h
|
|
}
|
|
|
|
invalid_option() {
|
|
bash "${BATS_TEST_DIRNAME}"/../dotbare fstat -p
|
|
}
|
|
|
|
no_modify() {
|
|
bash "${BATS_TEST_DIRNAME}"/../dotbare fstat
|
|
}
|
|
|
|
@test "fstat help" {
|
|
run help
|
|
[ "${status}" -eq 0 ]
|
|
[ "${lines[0]}" = "Usage: dotbare fstat [-h] ..." ]
|
|
}
|
|
|
|
@test "fstat invalid option" {
|
|
run invalid_option
|
|
[ "${status}" -eq 1 ]
|
|
[ "${lines[0]}" = "Invalid option: p" ]
|
|
}
|
|
|
|
@test "fstat run no modify file" {
|
|
run no_modify
|
|
[ "${status}" -eq 0 ]
|
|
}
|