summaryrefslogtreecommitdiff
path: root/src/testdir
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2020-08-05 11:51:30 +0200
committerBram Moolenaar <Bram@vim.org>2020-08-05 11:51:30 +0200
commitff1cd39cfe62d5089d5e703f4eb290694751ace3 (patch)
tree57070a46bb4b9e498a5113a226560668a0b84919 /src/testdir
parentb4caa163ff7bfacd4bec00e4baa55b5669ff1191 (diff)
downloadvim-git-ff1cd39cfe62d5089d5e703f4eb290694751ace3.tar.gz
patch 8.2.1368: Vim9: no error for missing white space around operatorv8.2.1368
Problem: Vim9: no error for missing white space around operator. Solution: Check for white space around <, !=, etc.
Diffstat (limited to 'src/testdir')
-rw-r--r--src/testdir/test_vim9_expr.vim32
1 files changed, 32 insertions, 0 deletions
diff --git a/src/testdir/test_vim9_expr.vim b/src/testdir/test_vim9_expr.vim
index ab274a10d..aa7aed72a 100644
--- a/src/testdir/test_vim9_expr.vim
+++ b/src/testdir/test_vim9_expr.vim
@@ -726,6 +726,38 @@ def Test_expr4_vimscript()
set noignorecase
END
CheckScriptSuccess(lines)
+
+ # check missing white space
+ lines =<< trim END
+ vim9script
+ echo 2>3
+ END
+ CheckScriptFailure(lines, 'E1004:')
+ lines =<< trim END
+ vim9script
+ echo 2 >3
+ END
+ CheckScriptFailure(lines, 'E1004:')
+ lines =<< trim END
+ vim9script
+ echo 2> 3
+ END
+ CheckScriptFailure(lines, 'E1004:')
+ lines =<< trim END
+ vim9script
+ echo 2!=3
+ END
+ CheckScriptFailure(lines, 'E1004:')
+ lines =<< trim END
+ vim9script
+ echo 2 !=3
+ END
+ CheckScriptFailure(lines, 'E1004:')
+ lines =<< trim END
+ vim9script
+ echo 2!= 3
+ END
+ CheckScriptFailure(lines, 'E1004:')
enddef
func Test_expr4_fails()