mirror of
https://github.com/kazhala/dotbare
synced 2024-11-17 21:25:32 +00:00
funtrack test
This commit is contained in:
parent
feed88e78b
commit
d09293f9bc
@ -23,7 +23,7 @@ source "${mydir}"/../helper/git_query.sh
|
|||||||
source "${mydir}"/../helper/get_confirmation.sh
|
source "${mydir}"/../helper/get_confirmation.sh
|
||||||
|
|
||||||
function usage() {
|
function usage() {
|
||||||
echo -e "Usage: dotbare funtrack [-h] [-f] [-d] ...\n"
|
echo -e "Usage: dotbare funtrack [-h] [-s] [-S] ...\n"
|
||||||
echo -e "Untrack selected files from git\n"
|
echo -e "Untrack selected files from git\n"
|
||||||
echo -e "Note: by default, the untrack will remove the file from index while"
|
echo -e "Note: by default, the untrack will remove the file from index while"
|
||||||
echo -e "keeping the file in your current system (git rm --cached filename)"
|
echo -e "keeping the file in your current system (git rm --cached filename)"
|
||||||
|
21
tests/funtrack.bats
Executable file
21
tests/funtrack.bats
Executable file
@ -0,0 +1,21 @@
|
|||||||
|
#!/usr/bin/env bats
|
||||||
|
|
||||||
|
help() {
|
||||||
|
bash "${BATS_TEST_DIRNAME}"/../dotbare funtrack -h
|
||||||
|
}
|
||||||
|
|
||||||
|
invalid_option() {
|
||||||
|
bash "${BATS_TEST_DIRNAME}"/../dotbare funtrack -p
|
||||||
|
}
|
||||||
|
|
||||||
|
@test "funtrack help" {
|
||||||
|
run help
|
||||||
|
[ "${status}" -eq 0 ]
|
||||||
|
[ "${lines[0]}" = "Usage: dotbare funtrack [-h] [-s] [-S] ..." ]
|
||||||
|
}
|
||||||
|
|
||||||
|
@test "funtrack invalid option" {
|
||||||
|
run invalid_option
|
||||||
|
[ "${status}" -eq 1 ]
|
||||||
|
[ "${lines[0]}" = "Invalid option: p" ]
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user