summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBram Moolenaar <bram@vim.org>2011-06-13 21:21:22 +0200
committerBram Moolenaar <bram@vim.org>2011-06-13 21:21:22 +0200
commit6b3326751b4d9c4300869ee79a30df58031f954a (patch)
tree03210b07dd86e6d34a50b12ad5a749b0129eb255
parentb5bad12458c906835845894d13cccd2fbacf1ad9 (diff)
downloadvim-6b3326751b4d9c4300869ee79a30df58031f954a.tar.gz
Add files added by recent patches.
-rw-r--r--src/msvc2010.bat7
-rw-r--r--src/testdir/test78.in46
-rw-r--r--src/testdir/test78.ok3
3 files changed, 56 insertions, 0 deletions
diff --git a/src/msvc2010.bat b/src/msvc2010.bat
new file mode 100644
index 00000000..d9fc6c07
--- /dev/null
+++ b/src/msvc2010.bat
@@ -0,0 +1,7 @@
+@echo off
+rem To be used on MS-Windows for Visual C++ 2010 Express Edition
+rem aka Microsoft Visual Studio 10.0.
+rem See INSTALLpc.txt for information.
+@echo on
+
+call "%VS100COMNTOOLS%%vsvars32.bat"
diff --git a/src/testdir/test78.in b/src/testdir/test78.in
new file mode 100644
index 00000000..bcbc9724
--- /dev/null
+++ b/src/testdir/test78.in
@@ -0,0 +1,46 @@
+Inserts 10000 lines with text to fill the swap file with two levels of pointer
+blocks. Then recovers from the swap file and checks all text is restored.
+
+We need about 10000 lines of 100 characters to get two levels of pointer
+blocks.
+
+STARTTEST
+:so small.vim
+:set nocp fileformat=unix undolevels=-1
+:e! Xtest
+ggdG
+:let text = "\tabcdefghijklmnoparstuvwxyz0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnoparstuvwxyz0123456789"
+:let i = 1
+:let linecount = 10000
+:while i <= linecount | call append(i - 1, i . text) | let i += 1 | endwhile
+:preserve
+:" get the name of the swap file
+:redir => swapname
+:swapname
+:redir END
+:let swapname = substitute(swapname, '[[:blank:][:cntrl:]]*\(.\{-}\)[[:blank:][:cntrl:]]*$', '\1', '')
+:" make a copy of the swap file in Xswap
+:set bin
+:exe 'sp ' . swapname
+:w! Xswap
+:echo swapname
+:set nobin
+:new
+:only!
+:bwipe! Xtest
+:call rename('Xswap', swapname)
+:recover Xtest
+:call delete(swapname)
+:new
+:call append(0, 'recovery start')
+:wincmd w
+:let linedollar = line('$')
+:if linedollar < linecount | exe 'wincmd w' | call append(line('$'), "expected " . linecount . " lines but found only " . linedollar) | exe 'wincmd w' | let linecount = linedollar | endif
+:let i = 1
+:while i <= linecount | if getline(i) != i . text | exe 'wincmd w' | call append(line('$'), i . ' differs') | exe 'wincmd w' | endif | let i += 1 | endwhile
+:q!
+:call append(line('$'), 'recovery end')
+:w! test.out
+:qa!
+ENDTEST
+
diff --git a/src/testdir/test78.ok b/src/testdir/test78.ok
new file mode 100644
index 00000000..6c3ecefe
--- /dev/null
+++ b/src/testdir/test78.ok
@@ -0,0 +1,3 @@
+recovery start
+
+recovery end