From 977d07a3ae47ef204665d1eda2d642e5064724f3 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Mon, 24 Jun 2019 12:01:19 +0200 Subject: Split build system into library and driver --- libbuild2/lexer+comment.test.testscript | 139 ++++++++++++++++++++++++++++++++ 1 file changed, 139 insertions(+) create mode 100644 libbuild2/lexer+comment.test.testscript (limited to 'libbuild2/lexer+comment.test.testscript') diff --git a/libbuild2/lexer+comment.test.testscript b/libbuild2/lexer+comment.test.testscript new file mode 100644 index 0000000..6ad1202 --- /dev/null +++ b/libbuild2/lexer+comment.test.testscript @@ -0,0 +1,139 @@ +# file : libbuild2/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