pull/13/head
kevin zhuang 4 years ago
parent fde35e9780
commit 6ccf7ed694

@ -45,7 +45,7 @@ invalid_command() {
@test "main routing2" {
run routing2
[ "${status}" -eq 0 ]
[ "${lines[0]}" = "Usage: dotbare flog [-h] [-r] [-R] [-e] [-c] ..." ]
[ "${lines[0]}" = "Usage: dotbare flog [-h] [-r] [-R] [-e] [-c] [-y] ..." ]
}
@test "main git command" {

@ -74,6 +74,8 @@ select_file() {
@test "fbackup select file" {
run select_file
echo "${status}" >&3
echo "${output}" >&3
[ "${status}" -eq 1 ]
[[ "${output}" =~ 'cp: selectgitfile: No such file or directory' ]]
}

@ -21,6 +21,9 @@ if [[ "$*" =~ "--header=select a commit to checkout" ]] && [[ "$*" =~ "show --co
echo "--commitshow"
elif [[ "$*" =~ '--no-multi --header=select the target commit for HEAD' ]] && [[ "$*" =~ "show --color" ]]; then
echo "--commitshow"
elif [[ "$*" =~ "--no-multi --header=select a commit to rename" ]] && [[ "$*" =~ "show --color=always" ]]; then
# dotbare fedit -c test
echo "commitdiff"
elif [[ "$*" =~ '--header=select a commit' ]] && [[ "$*" =~ "show --color" ]]; then
echo "--commitshow"
elif [[ "$*" =~ "--no-multi --header=select a branch to checkout" ]]; then
@ -33,8 +36,6 @@ elif [[ "$*" =~ '--multi --preview ' ]] && [[ "$*" =~ "tree -L 1 -C --dirsfirst
echo "searchdir"
elif [[ "$*" =~ '--header=select the target commit' ]] && [[ "$*" =~ "diff --color" ]]; then
echo "commitdiff"
elif [[ "$*" =~ "--no-multi --header=select a commit to rename" ]] && [[ "$*" =~ "show --color=always" ]]; then
echo "commitdiff"
elif [[ "$*" =~ '--multi --preview ' ]] && [[ "$*" =~ "cat {}" ]]; then
echo "searchfile"
elif [[ "$*" =~ "--header=select a file to checkout version in HEAD" ]] && [[ "$*" =~ "diff HEAD --color=always" ]]; then
@ -46,5 +47,6 @@ elif [[ "$*" =~ "--header=select files to unstage" ]] && [[ "$*" =~ "diff HEAD -
elif [[ "$*" =~ "--header=select tracked files to edit" ]]; then
exit
elif [[ "$*" =~ "--no-multi --header=commit --commitshow" ]]; then
# dotbare flog test
echo "exit"
fi

Loading…
Cancel
Save