Mercurial > vim
comparison src/testdir/test_let.vim @ 24958:21ec48d542a8 v8.2.3016
patch 8.2.3016: confusing error when expression is followed by comma
Commit: https://github.com/vim/vim/commit/fae55a9cb0838e4c2e634e55a3468af4a75fbdf2
Author: Bram Moolenaar <Bram@vim.org>
Date: Thu Jun 17 22:08:30 2021 +0200
patch 8.2.3016: confusing error when expression is followed by comma
Problem: Confusing error when expression is followed by comma.
Solution: Give a different error for trailing text. (closes https://github.com/vim/vim/issues/8395)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Thu, 17 Jun 2021 22:15:03 +0200 |
parents | f2bd92589670 |
children | 3b8d3b383fd6 |
comparison
equal
deleted
inserted
replaced
24957:674d99f8705f | 24958:21ec48d542a8 |
---|---|
312 call assert_fails('let g:.min = function("max")', 'E704:') | 312 call assert_fails('let g:.min = function("max")', 'E704:') |
313 if has('channel') | 313 if has('channel') |
314 let ch = test_null_channel() | 314 let ch = test_null_channel() |
315 call assert_fails('let ch += 1', 'E734:') | 315 call assert_fails('let ch += 1', 'E734:') |
316 endif | 316 endif |
317 call assert_fails('let name = "a" .. "b",', 'E488: Trailing characters: ,') | |
317 | 318 |
318 " This test works only when the language is English | 319 " This test works only when the language is English |
319 if v:lang == "C" || v:lang =~ '^[Ee]n' | 320 if v:lang == "C" || v:lang =~ '^[Ee]n' |
320 call assert_fails('let [a ; b;] = [10, 20]', | 321 call assert_fails('let [a ; b;] = [10, 20]', |
321 \ 'Double ; in list of variables') | 322 \ 'Double ; in list of variables') |