Skip to content

Commit

Permalink
update test
Browse files Browse the repository at this point in the history
  • Loading branch information
PatrickF1 committed Oct 10, 2022
1 parent afe3828 commit 9961b0c
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 11 deletions.
26 changes: 26 additions & 0 deletions tests/_resources/alphabet 26 lines
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
u
z
15 changes: 15 additions & 0 deletions tests/preview_changed_file/renamed_path_modifications.fish
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
set orig_path "tests/_resources/alphabet 26 lines"
set renamed_path "tests/_resources/alphabet lines"
set added_line a-very-unique-line
git mv $orig_path $renamed_path
echo $added_line >>$renamed_path
git add $renamed_path

set output (_fzf_preview_changed_file "R \"$orig_path\" -> \"$renamed_path\"")

# test that the added line shows up in the diff but not the entire file
string match --entire --quiet $added_line $output &&
not string match x --quiet a
@test "shows only the modifications made to renamed file" $status -eq 0

git reset --hard
11 changes: 0 additions & 11 deletions tests/preview_changed_file/renamed_path_with_spaces.fish

This file was deleted.

0 comments on commit 9961b0c

Please sign in to comment.