diff --git a/tests/syntax_error/missing_end_quote_in_byte.jou b/tests/syntax_error/missing_end_quote_in_byte.jou new file mode 100644 index 00000000..52fe3caf --- /dev/null +++ b/tests/syntax_error/missing_end_quote_in_byte.jou @@ -0,0 +1,6 @@ +import "stdlib/io.jou" + +# Output: compiler error in file "tests/syntax_error/missing_end_quote_in_byte.jou", line 5: missing ' to end the byte literal +def main() -> int: + printf('?) + return 0 diff --git a/tests/syntax_error/missing_end_quote_in_string.jou b/tests/syntax_error/missing_end_quote_in_string.jou new file mode 100644 index 00000000..a860da4c --- /dev/null +++ b/tests/syntax_error/missing_end_quote_in_string.jou @@ -0,0 +1,6 @@ +import "stdlib/io.jou" + +# Output: compiler error in file "tests/syntax_error/missing_end_quote_in_string.jou", line 5: missing " to end the string +def main() -> int: + printf("Hello) + return 0 diff --git a/tests/syntax_error/string_continue_on_next_line.jou b/tests/syntax_error/string_continue_on_next_line.jou new file mode 100644 index 00000000..c9fc5d5d --- /dev/null +++ b/tests/syntax_error/string_continue_on_next_line.jou @@ -0,0 +1,8 @@ +import "stdlib/io.jou" + +# Output: compiler error in file "tests/syntax_error/string_continue_on_next_line.jou", line 5: missing ' to end the byte literal +def main() -> int: + a = '\ + 't\'' + printf(a) + return 0