From 77410b0cdde47219d6c6a36533fcb9354f17c3dd Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Wed, 6 Mar 2019 23:06:30 +0300 Subject: Use new setup for unit tests --- build2/lexer+comment.test.testscript | 139 +++++++++++++++++++++++++++++++++++ 1 file changed, 139 insertions(+) create mode 100644 build2/lexer+comment.test.testscript (limited to 'build2/lexer+comment.test.testscript') diff --git a/build2/lexer+comment.test.testscript b/build2/lexer+comment.test.testscript new file mode 100644 index 0000000..4323c84 --- /dev/null +++ b/build2/lexer+comment.test.testscript @@ -0,0 +1,139 @@ +# file : build2/lexer+comment.test.testscript +# copyright : Copyright (c) 2014-2019 Code Synthesis Ltd +# license : MIT; see accompanying LICENSE file + +: single-line +: +{ + : only + : + $* <>:EOO + # comment + EOI + EOO + + : first + : + $* <>EOO + # comment + foo + EOI + 'foo' + + EOO + + : last + : + $* <>EOO + foo + # comment + EOI + 'foo' + + EOO + + : few + : + $* <>EOO + foo + # comment + # comment + EOI + 'foo' + + EOO + + : cont + : + $* <>EOO + foo + # comment\\ + bar + EOI + 'foo' + + 'bar' + + EOO + + : same + : + $* <>EOO + foo # comment + bar # comment + EOI + 'foo' + + 'bar' + + EOO +} + +: multi-line +: +{ + : only + : + $* <>:EOO + #\ + comment + comment + #\ + EOI + EOO + + : empty + : + $* <>:EOO + #\ + #\ + EOI + EOO + + : start-same + : + $* <>EOO + foo #\ + comment + comment + #\ + EOI + 'foo' + + EOO + + : end-same + : + $* <>EOO + #\ + comment + comment + foo #\ + bar + EOI + 'bar' + + EOO + + : end-not + : + $* <>EOO + #\ + comment + #\ not an end + foo #\ + bar + EOI + 'bar' + + EOO + + : unterm + : + $* <>EOE != 0 + #\ + comment + EOI + stdin:3:1: error: unterminated multi-line comment + EOE +} -- cgit v1.1