checkout test

pull/3/head
kevin zhuang 4 years ago
parent 5a52e7d504
commit 36286b76d1

@ -19,7 +19,7 @@ no_file_selected() {
[ "${lines[0]}" = "Usage: dotbare fadd [-h] [-f] [-d] ..." ]
}
@test "fadd nofile stage" {
@test "fadd invalid option" {
run invalid_option
[ "${status}" -eq 1 ]
[ "${lines[0]}" = "Invalid option: p" ]

@ -0,0 +1,21 @@
#!/usr/bin/env bats
help() {
bash "${BATS_TEST_DIRNAME}"/../dotbare fcheckout -h
}
invalid_option() {
bash "${BATS_TEST_DIRNAME}"/../dotbare fcheckout -p
}
@test "fcheckout help" {
run help
[ "${status}" -eq 0 ]
[ "${lines[0]}" = "Usage: dotbare fcheckout [-h] [-a] [-b] [-c] ..." ]
}
@test "fchekcout invalid option" {
run invalid_option
[ "${status}" -eq 1 ]
[ "${lines[0]}" = "Invalid option: p" ]
}
Loading…
Cancel
Save