From 5007870b52aa549971824959a55ad3bb886f09e0 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Mon, 3 Sep 2018 16:37:32 +0200 Subject: Rename .test/test{} to .testscript/testscript{} --- unit-tests/cc/lexer/char-literal.testscript | 67 +++++++++++++++++++++++++++++ 1 file changed, 67 insertions(+) create mode 100644 unit-tests/cc/lexer/char-literal.testscript (limited to 'unit-tests/cc/lexer/char-literal.testscript') diff --git a/unit-tests/cc/lexer/char-literal.testscript b/unit-tests/cc/lexer/char-literal.testscript new file mode 100644 index 0000000..dac66e2 --- /dev/null +++ b/unit-tests/cc/lexer/char-literal.testscript @@ -0,0 +1,67 @@ +# file : unit-tests/cc/lexer/char-literal.testscript +# copyright : Copyright (c) 2014-2018 Code Synthesis Ltd +# license : MIT; see accompanying LICENSE file + +# Test character literals. +# + +: normal +: +$* <>EOO +'a' +'aa' +'"' +EOI + + + +EOO + +: prefix +: +$* <>EOO +L'a' +U'a' +u'a' +u8'a' +u8R'a' +EOI + + + + +'u8R' + +EOO + +: suffix +: +$* <>EOO +'a'x +'a'_X123 +EOI + + +EOO + +: escape +: +$* <>EOO +'\'' +'\\' +'\\\'' +'\n' +U'\U0001f34c' +EOI + + + + + +EOO + +: unterminated +: +$* <"'a" 2>>EOE != 0 +stdin:1:1: error: unterminated character literal +EOE -- cgit v1.1