From 0cef93b4e2e9bf39b0ca542876f9ab1af6d0f01d Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Wed, 24 May 2017 13:24:31 +0200 Subject: Implement support for tokenization of preprocessed C/C++ source --- unit-tests/cc/lexer/line.test | 67 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 67 insertions(+) create mode 100644 unit-tests/cc/lexer/line.test (limited to 'unit-tests/cc/lexer/line.test') diff --git a/unit-tests/cc/lexer/line.test b/unit-tests/cc/lexer/line.test new file mode 100644 index 0000000..9eda9c3 --- /dev/null +++ b/unit-tests/cc/lexer/line.test @@ -0,0 +1,67 @@ +# file : unit-tests/cc/lexer/line.test +# copyright : Copyright (c) 2014-2017 Code Synthesis Ltd +# license : MIT; see accompanying LICENSE file + +# Test line continuations. +# + +: identifier +: +$* <"'foo123'" +fo\ +o\ +1\ +2\ +3 +EOI + +: punctuation +: +$* <'' +.\ +.\ +. +EOI + +: c-comment +: +$* <>EOO +\abc +EOI + +'abc' +EOO + +: multiple +: +$* <>EOO +\\ +EOI + +EOO + +: unterminated +: +$* <<:EOI >'' +\ +EOI -- cgit v1.1