From: Lucas Bajolet Date: Tue, 22 Mar 2016 15:18:23 +0000 (-0400) Subject: tests: Added prefixed character test X-Git-Url: http://nitlanguage.org tests: Added prefixed character test Signed-off-by: Lucas Bajolet --- diff --git a/tests/sav/test_prefixed_chars.res b/tests/sav/test_prefixed_chars.res new file mode 100644 index 0000000..a334f7f --- /dev/null +++ b/tests/sav/test_prefixed_chars.res @@ -0,0 +1,2 @@ +0x41 +66515 diff --git a/tests/sav/test_prefixed_chars_alt1.res b/tests/sav/test_prefixed_chars_alt1.res new file mode 100644 index 0000000..8c96895 --- /dev/null +++ b/tests/sav/test_prefixed_chars_alt1.res @@ -0,0 +1 @@ +alt/test_prefixed_chars_alt1.nit:18,17--20: Syntax Error: usage of byte prefix on multibyte character. diff --git a/tests/test_prefixed_chars.nit b/tests/test_prefixed_chars.nit new file mode 100644 index 0000000..3070060 --- /dev/null +++ b/tests/test_prefixed_chars.nit @@ -0,0 +1,21 @@ +# This file is part of NIT ( http://www.nitlanguage.org ). +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +var ascii_char = b'A' +var unicode_char = u'𐏓' + +#alt1 var bug_ascii = b'𐏓' + +print ascii_char +print unicode_char