mirror of
https://github.com/airblade/vim-gitgutter.git
synced 2025-11-09 12:03:48 -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
|
||||
|
||||
function! Setup()
|
||||
call system('git reset HEAD fixture.txt')
|
||||
call system('git checkout fixture.txt')
|
||||
edit! fixture.txt
|
||||
sign unplace *
|
||||
endfunction
|
||||
|
||||
@@ -8,6 +8,9 @@ rm -f *.actual
|
||||
|
||||
# Execute the tests.
|
||||
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!'
|
||||
done
|
||||
|
||||
@@ -22,6 +25,7 @@ for expected in *.expected; do
|
||||
if diff $expected $actual; then
|
||||
count_ok=$((count_ok + 1))
|
||||
echo "$name ok"
|
||||
rm $actual
|
||||
else
|
||||
count_fail=$((count_fail + 1))
|
||||
echo "$name failed"
|
||||
@@ -31,7 +35,6 @@ done
|
||||
# Clean up.
|
||||
git reset HEAD fixture.txt > /dev/null
|
||||
git checkout fixture.txt
|
||||
# rm -f *.actual
|
||||
|
||||
# Print results.
|
||||
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