mirror of
https://github.com/vim/vim.git
synced 2025-11-13 22:54:27 -05:00
updated for version 7.4.229
Problem: Using ":let" for listing variables and the second one is a curly
braces expression may fail.
Solution: Check for an "=" in a better way. (ZyX)
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
Tests for autoload. vim: set ft=vim ts=8 :
|
||||
Tests for :let. vim: set ft=vim ts=8 :
|
||||
|
||||
STARTTEST
|
||||
:so small.vim
|
||||
@@ -10,6 +10,20 @@ STARTTEST
|
||||
:catch
|
||||
: $put ='FAIL: ' . v:exception
|
||||
:endtry
|
||||
:let a = 1
|
||||
:let b = 2
|
||||
:for letargs in ['a b', '{0 == 1 ? "a" : "b"}', '{0 == 1 ? "a" : "b"} a', 'a {0 == 1 ? "a" : "b"}']
|
||||
: try
|
||||
: redir => messages
|
||||
: execute 'let' letargs
|
||||
: redir END
|
||||
: $put ='OK:'
|
||||
: $put =split(substitute(messages, '\n', '\0 ', 'g'), '\n')
|
||||
: catch
|
||||
: $put ='FAIL: ' . v:exception
|
||||
: redir END
|
||||
: endtry
|
||||
:endfor
|
||||
:/^Results/,$wq! test.out
|
||||
ENDTEST
|
||||
|
||||
|
||||
@@ -1,2 +1,13 @@
|
||||
Results of test104:
|
||||
OK: function('tr')
|
||||
OK:
|
||||
a #1
|
||||
b #2
|
||||
OK:
|
||||
b #2
|
||||
OK:
|
||||
b #2
|
||||
a #1
|
||||
OK:
|
||||
a #1
|
||||
b #2
|
||||
|
||||
Reference in New Issue
Block a user