diff options
author | Bram Moolenaar <Bram@vim.org> | 2022-05-10 13:24:30 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2022-05-10 13:24:30 +0100 |
commit | 0abc2871c105882ed1c1effb9a7757fad8a395bd (patch) | |
tree | 0377e3f47b0fda6713cc0e8b6426616457e07912 /src/testdir/test_expr.vim | |
parent | 57ff52677bf5ba1651281ffe40505df8feba4a36 (diff) |
patch 8.2.4930: interpolated string expression requires escapingv8.2.4930
Problem: Interpolated string expression requires escaping.
Solution: Do not require escaping in the expression.
Diffstat (limited to 'src/testdir/test_expr.vim')
-rw-r--r-- | src/testdir/test_expr.vim | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/testdir/test_expr.vim b/src/testdir/test_expr.vim index 3ea59eb267..0b6b57e4a2 100644 --- a/src/testdir/test_expr.vim +++ b/src/testdir/test_expr.vim @@ -897,7 +897,7 @@ func Test_string_interp() #" Escaping rules. call assert_equal('"foo"{bar}', $"\"foo\"{{bar}}") call assert_equal('"foo"{bar}', $'"foo"{{bar}}') - call assert_equal('foobar', $"{\"foo\"}" .. $'{''bar''}') + call assert_equal('foobar', $"{"foo"}" .. $'{'bar'}') #" Whitespace before/after the expression. call assert_equal('3', $"{ 1 + 2 }") #" String conversion. @@ -907,8 +907,8 @@ func Test_string_interp() call assert_equal(string(v:true), $"{v:true}") call assert_equal('(1+1=2)', $"(1+1={1 + 1})") #" Hex-escaped opening brace: char2nr('{') == 0x7b - call assert_equal('esc123ape', $"esc\x7b123}ape") - call assert_equal('me{}me', $"me{\x7b}\x7dme") + call assert_equal('esc123ape', $"esc{123}ape") + call assert_equal('me{}me', $"me{"\x7b"}\x7dme") VAR var1 = "sun" VAR var2 = "shine" call assert_equal('sunshine', $"{var1}{var2}") @@ -916,7 +916,7 @@ func Test_string_interp() #" Multibyte strings. call assert_equal('say ハロー・ワールド', $"say {'ハロー・ワールド'}") #" Nested. - call assert_equal('foobarbaz', $"foo{$\"{'bar'}\"}baz") + call assert_equal('foobarbaz', $"foo{$"{'bar'}"}baz") #" Do not evaluate blocks when the expr is skipped. VAR tmp = 0 if v:false |