mirror of
https://github.com/airblade/vim-gitgutter.git
synced 2025-11-09 20:13:46 -05:00
More tests.
This commit is contained in:
4
test/followSymlink.expected
Normal file
4
test/followSymlink.expected
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
|
||||||
|
--- Signs ---
|
||||||
|
Signs for symlink:
|
||||||
|
line=5 id=3000 name=GitGutterLineRemoved
|
||||||
@@ -2,8 +2,6 @@ set runtimepath+=../
|
|||||||
source ../plugin/gitgutter.vim
|
source ../plugin/gitgutter.vim
|
||||||
|
|
||||||
function! Setup()
|
function! Setup()
|
||||||
call system('git reset HEAD fixture.txt')
|
|
||||||
call system('git checkout fixture.txt')
|
|
||||||
edit! fixture.txt
|
edit! fixture.txt
|
||||||
sign unplace *
|
sign unplace *
|
||||||
endfunction
|
endfunction
|
||||||
|
|||||||
@@ -8,6 +8,9 @@ rm -f *.actual
|
|||||||
|
|
||||||
# Execute the tests.
|
# Execute the tests.
|
||||||
for testcase in test*.vim; do
|
for testcase in test*.vim; do
|
||||||
|
git reset HEAD fixture.txt > /dev/null
|
||||||
|
git checkout fixture.txt
|
||||||
|
|
||||||
vim -N -u NONE -S $testcase -c 'quit!'
|
vim -N -u NONE -S $testcase -c 'quit!'
|
||||||
done
|
done
|
||||||
|
|
||||||
@@ -22,6 +25,7 @@ for expected in *.expected; do
|
|||||||
if diff $expected $actual; then
|
if diff $expected $actual; then
|
||||||
count_ok=$((count_ok + 1))
|
count_ok=$((count_ok + 1))
|
||||||
echo "$name ok"
|
echo "$name ok"
|
||||||
|
rm $actual
|
||||||
else
|
else
|
||||||
count_fail=$((count_fail + 1))
|
count_fail=$((count_fail + 1))
|
||||||
echo "$name failed"
|
echo "$name failed"
|
||||||
@@ -31,7 +35,6 @@ done
|
|||||||
# Clean up.
|
# Clean up.
|
||||||
git reset HEAD fixture.txt > /dev/null
|
git reset HEAD fixture.txt > /dev/null
|
||||||
git checkout fixture.txt
|
git checkout fixture.txt
|
||||||
# rm -f *.actual
|
|
||||||
|
|
||||||
# Print results.
|
# Print results.
|
||||||
echo
|
echo
|
||||||
|
|||||||
10
test/testFollowSymlink.vim
Normal file
10
test/testFollowSymlink.vim
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
source helper.vim
|
||||||
|
|
||||||
|
let tmpfile = 'symlink'
|
||||||
|
call system('ln -nfs fixture.txt '.tmpfile)
|
||||||
|
execute 'edit '.tmpfile
|
||||||
|
execute '6d'
|
||||||
|
write
|
||||||
|
call DumpSigns('followSymlink')
|
||||||
|
|
||||||
|
call system('rm '.tmpfile)
|
||||||
Reference in New Issue
Block a user