From b8d953c43c56c3281405ee7df56fc83ff1fc7e90 Mon Sep 17 00:00:00 2001 From: baabelfish Date: Tue, 15 Mar 2016 01:14:11 +0200 Subject: [PATCH] Test syntax highlighting --- other/tests/vim/syntax.vader | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 other/tests/vim/syntax.vader diff --git a/other/tests/vim/syntax.vader b/other/tests/vim/syntax.vader new file mode 100644 index 0000000..3e1131a --- /dev/null +++ b/other/tests/vim/syntax.vader @@ -0,0 +1,24 @@ +Given nim: + import + sequtils, + streams + + type Obj = object + x, y: int + + proc nope = + echo "foobar" + echo "x" == "y" + nope() + + +Execute: + AssertEqual SyntaxAt(1, 1), "nimInclude" + AssertEqual SyntaxAt(5, 12), "nimStorage" + AssertEqual SyntaxAt(5, 1), "nimStorageClass" + AssertEqual SyntaxAt(6, 9), "nimBuiltinType" + AssertEqual SyntaxAt(8, 1), "nimTypedef" + AssertEqual SyntaxAt(9, 3), "nimBuiltinFunction" + AssertEqual SyntaxAt(9, 8), "nimString" + AssertEqual SyntaxAt(10, 13), "nimOP5" + AssertEqual SyntaxAt(11, 1), "nimIdentifier"