tests: Added prefixed character test
authorLucas Bajolet <r4pass@hotmail.com>
Tue, 22 Mar 2016 15:18:23 +0000 (11:18 -0400)
committerLucas Bajolet <r4pass@hotmail.com>
Tue, 22 Mar 2016 19:00:26 +0000 (15:00 -0400)
Signed-off-by: Lucas Bajolet <r4pass@hotmail.com>

tests/sav/test_prefixed_chars.res [new file with mode: 0644]
tests/sav/test_prefixed_chars_alt1.res [new file with mode: 0644]
tests/test_prefixed_chars.nit [new file with mode: 0644]

diff --git a/tests/sav/test_prefixed_chars.res b/tests/sav/test_prefixed_chars.res
new file mode 100644 (file)
index 0000000..a334f7f
--- /dev/null
@@ -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 (file)
index 0000000..8c96895
--- /dev/null
@@ -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 (file)
index 0000000..3070060
--- /dev/null
@@ -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