Merge pull request #1510 from three-comrades/testnocp

Allow all tests to pass with 'nocp'
This commit is contained in:
Justin M. Keyes 2014-12-06 12:03:52 -05:00
commit 85e9bab936
11 changed files with 27 additions and 22 deletions

View File

@ -1,3 +1,3 @@
:set cp :set nocp nomore
:map dotest /^STARTTEST j:set ff=unix cpo-=A :.,/ENDTEST/-1w! Xdotest :set ff& cpo+=A nj0:so! Xdotest dotest :map dotest /^STARTTEST j:set ff=unix cpo-=A :.,/ENDTEST/-1w! Xdotest :set ff& cpo+=A nj0:so! Xdotest dotest
dotest dotest

View File

@ -2,6 +2,7 @@ Test for "*Cmd" autocommands
STARTTEST STARTTEST
:so small.vim :so small.vim
:set wildchar=^E
:/^start/,$w! Xxx " write lines below to Xxx :/^start/,$w! Xxx " write lines below to Xxx
:au BufReadCmd XtestA 0r Xxx|$del :au BufReadCmd XtestA 0r Xxx|$del
:e XtestA " will read text of Xxd instead :e XtestA " will read text of Xxd instead

View File

@ -4,7 +4,7 @@ STARTTEST
:so small.vim :so small.vim
:set noswf :set noswf
:set ve=all :set ve=all
-dgg j-dgg
:" :"
:" Insert "keyword keyw", ESC, C CTRL-N, shows "keyword ykeyword". :" Insert "keyword keyw", ESC, C CTRL-N, shows "keyword ykeyword".
:" Repeating CTRL-N fixes it. (Mary Ellen Foster) :" Repeating CTRL-N fixes it. (Mary Ellen Foster)

View File

@ -2,6 +2,7 @@ Tests for the exists() and has() functions. vim: set ft=vim ts=8 sw=2 :
STARTTEST STARTTEST
:so small.vim :so small.vim
:set wildchar=^E
:function! RunTest(str, result) :function! RunTest(str, result)
if exists(a:str) == a:result if exists(a:str) == a:result
echo "OK" echo "OK"

View File

@ -30,7 +30,7 @@ STARTTEST
/^{/+1 /^{/+1
:set tw=3 fo=t :set tw=3 fo=t
gqgqo gqgqo
a  a 
ENDTEST ENDTEST
{ {
@ -99,7 +99,7 @@ ENDTEST
STARTTEST STARTTEST
/^{/+2 /^{/+2
:set tw& fo=a :set tw& fo=a
I^^ I^^
ENDTEST ENDTEST
{ {

View File

@ -15,7 +15,7 @@ STARTTEST
:set tw=2 fo=t :set tw=2 fo=t
gqgqjgqgqo gqgqjgqgqo
abc  abc 
ENDTEST ENDTEST
{ {
@ -31,7 +31,7 @@ gqgqjgqgqjgqgqjgqgqjgqgqo
a a
a a
 
ENDTEST ENDTEST
{ {
@ -55,7 +55,7 @@ a
ab ab
abc abc
ab c ab c
ab ab
ENDTEST ENDTEST
{ {
@ -110,7 +110,7 @@ gqgqjgqgqjgqgqjgqgqjgqgqjgqgqjgqgqjgqgqjgqgqjgqgqo
a a
 
ENDTEST ENDTEST
{ {

View File

@ -3,6 +3,7 @@ Test for breakindent
STARTTEST STARTTEST
:so small.vim :so small.vim
:if !exists("+breakindent") | e! test.ok | w! test.out | qa! | endif :if !exists("+breakindent") | e! test.ok | w! test.out | qa! | endif
:set wildchar=^E
:10new|:vsp|:vert resize 20 :10new|:vsp|:vert resize 20
:put =\"\tabcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOP\" :put =\"\tabcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOP\"
:set ts=4 sw=4 sts=4 breakindent :set ts=4 sw=4 sts=4 breakindent

View File

@ -33,13 +33,13 @@ Test 4: Simple breakindent + min width: 18
Test 7: breakindent + shift by +1 + nu + sbr=? briopt:sbr Test 7: breakindent + shift by +1 + nu + sbr=? briopt:sbr
2 ab 2 ab
? m ? m
? x ? x
Test 8: breakindent + shift:1 + nu + sbr=# list briopt:sbr Test 8: breakindent + shift:1 + nu + sbr=# list briopt:sbr
2 ^Iabcd 2 ^Iabcd
# opq # opq
# BCD # BCD
Test 9: breakindent + shift by +1 + 'nu' + sbr=# list Test 9: breakindent + shift by +1 + 'nu' + sbr=# list
2 ^Iabcd 2 ^Iabcd

View File

@ -3,6 +3,7 @@ Test for linebreak and list option (non-utf8)
STARTTEST STARTTEST
:so small.vim :so small.vim
:if !exists("+linebreak") | e! test.ok | w! test.out | qa! | endif :if !exists("+linebreak") | e! test.ok | w! test.out | qa! | endif
:set wildchar=^E
:10new|:vsp|:vert resize 20 :10new|:vsp|:vert resize 20
:put =\"\tabcdef hijklmn\tpqrstuvwxyz_1060ABCDEFGHIJKLMNOP \" :put =\"\tabcdef hijklmn\tpqrstuvwxyz_1060ABCDEFGHIJKLMNOP \"
:norm! zt :norm! zt

View File

@ -3,6 +3,7 @@ Test for linebreak and list option in utf-8 mode
STARTTEST STARTTEST
:so small.vim :so small.vim
:if !exists("+linebreak") | e! test.ok | w! test.out | qa! | endif :if !exists("+linebreak") | e! test.ok | w! test.out | qa! | endif
:set wildchar=^E
:so mbyte.vim :so mbyte.vim
:if &enc !=? 'utf-8'|:e! test.ok|:w! test.out|qa!|endif :if &enc !=? 'utf-8'|:e! test.ok|:w! test.out|qa!|endif
:10new|:vsp|:vert resize 20 :10new|:vsp|:vert resize 20

View File

@ -22,7 +22,7 @@ describe('lisp indent', function()
:if-exists :supersede) :if-exists :supersede)
(let ((,ti ,title)) (let ((,ti ,title))
(as title ,ti) (as title ,ti)
(with center (with center
(as h2 (string-upcase ,ti))) (as h2 (string-upcase ,ti)))
(brs 3) (brs 3)
,@body)))) ,@body))))
@ -35,7 +35,7 @@ describe('lisp indent', function()
,@body ,@body
(princ "</a>")))]]) (princ "</a>")))]])
execute('set lisp expandtab') execute('set lisp')
execute('/^(defun') execute('/^(defun')
feed('=G:/^(defun/,$yank A<cr>') feed('=G:/^(defun/,$yank A<cr>')
@ -52,15 +52,15 @@ describe('lisp indent', function()
(defmacro page (name title &rest body) (defmacro page (name title &rest body)
(let ((ti (gensym))) (let ((ti (gensym)))
`(with-open-file (*standard-output* `(with-open-file (*standard-output*
(html-file ,name) (html-file ,name)
:direction :output :direction :output
:if-exists :supersede) :if-exists :supersede)
(let ((,ti ,title)) (let ((,ti ,title))
(as title ,ti) (as title ,ti)
(with center (with center
(as h2 (string-upcase ,ti))) (as h2 (string-upcase ,ti)))
(brs 3) (brs 3)
,@body)))) ,@body))))
;;; Utilities for generating links ;;; Utilities for generating links