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.
dotbare/tests/fstash.bats

31 lines
557 B
Plaintext

4 years ago
#!/usr/bin/env bats
help() {
bash "${BATS_TEST_DIRNAME}"/../dotbare fstash -h
}
invalid_option() {
bash "${BATS_TEST_DIRNAME}"/../dotbare fstash -w
}
stash_file() {
bash "${BATS_TEST_DIRNAME}"/../dotbare fstash -s
4 years ago
}
@test "fstash help" {
run help
[ "${status}" -eq 0 ]
[ "${lines[0]}" = "Usage: dotbare fstash [-h] [-s] [-d] [-p] ..." ]
4 years ago
}
@test "fstash invalid option" {
run invalid_option
[ "${status}" -eq 1 ]
[ "${lines[0]}" = "Invalid option: -w" ]
4 years ago
}
@test "fstash stash single file" {
run stash_file
[ "${status}" -eq 1 ]
}