diff options
| author | ckelsel <ckelsel@hotmail.com> | 2017-08-10 08:31:50 +0800 |
|---|---|---|
| committer | ckelsel <ckelsel@hotmail.com> | 2017-08-10 08:31:50 +0800 |
| commit | 9a5d309b5743d70832b4daedcea934af5e6cc127 (patch) | |
| tree | b35a1bec0e65da69b183bb074f2dab9354c18534 /src/nvim/testdir | |
| parent | 8b4dc955b7384180c1ae0eab6050bbf4e17c7673 (diff) | |
| parent | 085102fadf1c1371e863c0e9af8240038ce641e2 (diff) | |
| download | rneovim-9a5d309b5743d70832b4daedcea934af5e6cc127.tar.gz rneovim-9a5d309b5743d70832b4daedcea934af5e6cc127.tar.bz2 rneovim-9a5d309b5743d70832b4daedcea934af5e6cc127.zip | |
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'src/nvim/testdir')
| -rw-r--r-- | src/nvim/testdir/Makefile | 6 | ||||
| -rw-r--r-- | src/nvim/testdir/test_cmdline.vim | 4 | ||||
| -rw-r--r-- | src/nvim/testdir/test_undo.vim | 28 |
3 files changed, 36 insertions, 2 deletions
diff --git a/src/nvim/testdir/Makefile b/src/nvim/testdir/Makefile index 944222dbb6..7f1e25900b 100644 --- a/src/nvim/testdir/Makefile +++ b/src/nvim/testdir/Makefile @@ -3,10 +3,12 @@ # NVIM_PRG ?= ../../../build/bin/nvim +TMPDIR ?= Xtest-tmpdir SCRIPTSOURCE := ../../../runtime export SHELL := sh export NVIM_PRG := $(NVIM_PRG) +export TMPDIR SCRIPTS ?= \ test13.out \ @@ -149,10 +151,12 @@ clean: .*.swp \ .*.swo \ .gdbinit \ + $(TMPDIR) \ del test1.out: .gdbinit test1.in -rm -rf $*.failed $(RM_ON_RUN) $(RM_ON_START) wrongtermsize + mkdir -p $(TMPDIR) $(RUN_VIM) $*.in @/bin/sh -c "if test -e wrongtermsize; then \ echo; \ @@ -170,6 +174,7 @@ test1.out: .gdbinit test1.in %.out: %.in .gdbinit -rm -rf $*.failed test.ok $(RM_ON_RUN) + mkdir -p $(TMPDIR) cp $*.ok test.ok # Sleep a moment to avoid that the xterm title is messed up. # 200 msec is sufficient, but only modern sleep supports a fraction of @@ -212,4 +217,5 @@ newtests: newtestssilent newtestssilent: $(NEW_TESTS) %.res: %.vim .gdbinit + mkdir -p $(TMPDIR) $(RUN_VIMTEST) -u NONE -S runtest.vim $*.vim diff --git a/src/nvim/testdir/test_cmdline.vim b/src/nvim/testdir/test_cmdline.vim index 09f4b942ad..bab700284f 100644 --- a/src/nvim/testdir/test_cmdline.vim +++ b/src/nvim/testdir/test_cmdline.vim @@ -2,7 +2,7 @@ func Test_complete_tab() call writefile(['testfile'], 'Xtestfile') - call feedkeys(":e Xtest\t\r", "tx") + call feedkeys(":e Xtestf\t\r", "tx") call assert_equal('testfile', getline(1)) call delete('Xtestfile') endfunc @@ -17,7 +17,7 @@ func Test_complete_wildmenu() call writefile(['testfile1'], 'Xtestfile1') call writefile(['testfile2'], 'Xtestfile2') set wildmenu - call feedkeys(":e Xtest\t\t\r", "tx") + call feedkeys(":e Xtestf\t\t\r", "tx") call assert_equal('testfile2', getline(1)) call delete('Xtestfile1') diff --git a/src/nvim/testdir/test_undo.vim b/src/nvim/testdir/test_undo.vim index 9ff73fd870..171618f6f7 100644 --- a/src/nvim/testdir/test_undo.vim +++ b/src/nvim/testdir/test_undo.vim @@ -237,3 +237,31 @@ func Test_insert_expr() close! endfunc + +func Test_undofile_earlier() + throw 'skipped: Nvim does not support test_settime()' + + let t0 = localtime() - 43200 + call test_settime(t0) + new Xfile + call feedkeys("ione\<Esc>", 'xt') + set ul=100 + call test_settime(t0 + 1) + call feedkeys("otwo\<Esc>", 'xt') + set ul=100 + call test_settime(t0 + 2) + call feedkeys("othree\<Esc>", 'xt') + set ul=100 + w + wundo Xundofile + bwipe! + " restore normal timestamps. + call test_settime(0) + new Xfile + rundo Xundofile + earlier 1d + call assert_equal('', getline(1)) + bwipe! + call delete('Xfile') + call delete('Xundofile') +endfunc |