diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/examples/x.nim | 6 | ||||
-rw-r--r-- | test/examples/x.nim.styled | 6 | ||||
-rw-r--r-- | test/lexTests.py | 3 |
3 files changed, 15 insertions, 0 deletions
diff --git a/test/examples/x.nim b/test/examples/x.nim new file mode 100644 index 000000000..07c9d216f --- /dev/null +++ b/test/examples/x.nim @@ -0,0 +1,6 @@ +# Tests for Nim +let s = "foobar" + +# Feature #1260 +{.ident.} +stdin.readLine.split.map(parseInt).max.`$`.echo(" is the maximum!") diff --git a/test/examples/x.nim.styled b/test/examples/x.nim.styled new file mode 100644 index 000000000..fc1532e60 --- /dev/null +++ b/test/examples/x.nim.styled @@ -0,0 +1,6 @@ +{3}# Tests for Nim +{8}let{0} {16}s{0} {15}={0} {6}"foobar"{0} + +{3}# Feature #1260 +{15}{.{16}ident{15}.}{0} +{16}stdin{15}.{16}readLine{15}.{16}split{15}.{16}map{15}({16}parseInt{15}).{16}max{15}.{11}`$`{15}.{16}echo{15}({6}" is the maximum!"{15}){0} diff --git a/test/lexTests.py b/test/lexTests.py index 2dbb1b3ad..92042aa08 100644 --- a/test/lexTests.py +++ b/test/lexTests.py @@ -156,6 +156,9 @@ class TestLexers(unittest.TestCase): def testLua(self): self.LexExample("x.lua", b"lua", [b"function end"]) + def testNim(self): + self.LexExample("x.nim", b"nim", [b"else end if let"]) + def testRuby(self): self.LexExample("x.rb", b"ruby", [b"class def end"]) |