test: update fcheckout and fadd test with the reverted fzf executable

pull/17/head
Kevin Zhuang 4 years ago
parent d897c5f2b4
commit 42f530d611

@ -47,18 +47,16 @@ stage_modified_file() {
@test "fadd stage selected file" {
run stage_selected_file
[[ "${output}" =~ "add --multi --preview" ]]
[[ "${output}" =~ "preview.sh {}" ]]
[[ "${output}" =~ "add fadd_stage_file" ]]
}
@test "fadd stage selected dir" {
run stage_selected_dir
[[ "${output}" =~ "add --multi --preview tree -L 1 -C --dirsfirst {}" ]]
[[ "${output}" =~ "add fadd_stage_dir" ]]
}
@test "fadd stage modified file" {
run stage_modified_file
[[ "${output}" =~ "add" ]]
[[ "${output}" =~ "files to stage --preview echo {}" ]]
[[ "${output}" =~ "diff HEAD --color=always" ]]
[[ "${output}" =~ "fadd_stage_modified" ]]
}

@ -42,25 +42,23 @@ checkout_selected_file() {
@test "fcheckout branch" {
run checkout_branch
[[ "${output}" =~ "checkout" ]]
[[ "${output}" =~ "--no-multi --header=select a branch to checkout" ]]
[[ "${output}" =~ "checkout fcheckout_branch" ]]
}
@test "fcheckout commit" {
run checkout_commit
[[ "${output}" =~ "checkout --header=select" ]]
[[ "${output}" =~ "checkout fcheckout_commit" ]]
}
@test "fcheckout modified" {
run checkout_modified_file
[[ "${output}" =~ "checkout" ]]
[[ "${output}" =~ "file to checkout version in HEAD" ]]
[[ "${output}" =~ "diff HEAD --color=always" ]]
[[ "${output}" =~ "fcheckout_modified" ]]
}
@test "fcheckout select" {
run checkout_selected_file
[[ "${output}" =~ "checkout" ]]
[[ "${output}" =~ "--header=select a file to checkout" ]]
[[ "${output}" =~ "preview.sh" ]]
[[ "${output}" =~ "fcheckout_select_gitfile" ]]
[[ "${output}" =~ "fcheckout_select_commitdiff" ]]
}

Loading…
Cancel
Save