diff options
author | Michael Ennen <mike.ennen@gmail.com> | 2016-12-06 22:47:40 -0700 |
---|---|---|
committer | James McCoy <jamessan@jamessan.com> | 2016-12-12 10:17:35 -0500 |
commit | b42347da45933a2d1ed54e9ca65db37f50d3e8be (patch) | |
tree | 7c22c36c50112f4671472fa752da3c1e0531ea2a | |
parent | 537cee4883a00bc3dd8ac3524c8f704a372bdcc8 (diff) | |
download | rneovim-b42347da45933a2d1ed54e9ca65db37f50d3e8be.tar.gz rneovim-b42347da45933a2d1ed54e9ca65db37f50d3e8be.tar.bz2 rneovim-b42347da45933a2d1ed54e9ca65db37f50d3e8be.zip |
vim-patch:7.4.1862 Mark as NA
-rw-r--r-- | src/nvim/testdir/test_viml.vim | 80 | ||||
-rw-r--r-- | src/nvim/version.c | 2 |
2 files changed, 81 insertions, 1 deletions
diff --git a/src/nvim/testdir/test_viml.vim b/src/nvim/testdir/test_viml.vim index 2f9a72d618..a2997b6d4d 100644 --- a/src/nvim/testdir/test_viml.vim +++ b/src/nvim/testdir/test_viml.vim @@ -985,6 +985,86 @@ func Test_skip() endfunc "------------------------------------------------------------------------------- +" Test 93: :echo and string() {{{1 +"------------------------------------------------------------------------------- + +func Test_echo_and_string() + " String + let a = 'foo bar' + redir => result + echo a + echo string(a) + redir END + let l = split(result, "\n") + call assert_equal(["foo bar", + \ "'foo bar'"], l) + + " Float + if has('float') + let a = -1.2e0 + redir => result + echo a + echo string(a) + redir END + let l = split(result, "\n") + call assert_equal(["-1.2", + \ "-1.2"], l) + endif + + " Funcref + redir => result + echo function('string') + echo string(function('string')) + redir END + let l = split(result, "\n") + call assert_equal(["string", + \ "function('string')"], l) + + " Empty dictionaries in a list + let a = {} + redir => result + echo [a, a, a] + echo string([a, a, a]) + redir END + let l = split(result, "\n") + call assert_equal(["[{}, {}, {}]", + \ "[{}, {}, {}]"], l) + + " Empty dictionaries in a dictionary + let a = {} + let b = {"a": a, "b": a} + redir => result + echo b + echo string(b) + redir END + let l = split(result, "\n") + call assert_equal(["{'a': {}, 'b': {}}", + \ "{'a': {}, 'b': {}}"], l) + + " Empty lists in a list + let a = [] + redir => result + echo [a, a, a] + echo string([a, a, a]) + redir END + let l = split(result, "\n") + call assert_equal(["[[], [], []]", + \ "[[], [], []]"], l) + + " Empty lists in a dictionary + let a = [] + let b = {"a": a, "b": a} + redir => result + echo b + echo string(b) + redir END + let l = split(result, "\n") + call assert_equal(["{'a': [], 'b': []}", + \ "{'a': [], 'b': []}"], l) + +endfunc + +"------------------------------------------------------------------------------- " Modelines {{{1 " vim: ts=8 sw=4 tw=80 fdm=marker " vim: fdt=substitute(substitute(foldtext(),\ '\\%(^+--\\)\\@<=\\(\\s*\\)\\(.\\{-}\\)\:\ \\%(\"\ \\)\\=\\(Test\ \\d*\\)\:\\s*',\ '\\3\ (\\2)\:\ \\1',\ \"\"),\ '\\(Test\\s*\\)\\(\\d\\)\\D\\@=',\ '\\1\ \\2',\ "") diff --git a/src/nvim/version.c b/src/nvim/version.c index 296952e45c..f42000c6c0 100644 --- a/src/nvim/version.c +++ b/src/nvim/version.c @@ -578,7 +578,7 @@ static int included_patches[] = { // 1865 NA // 1864 NA // 1863 NA - // 1862, + // 1862 NA // 1861, 1860, // 1859 NA |