Skip to content

Commit

Permalink
add three tests
Browse files Browse the repository at this point in the history
  • Loading branch information
littlewhitecloud authored Dec 16, 2023
1 parent 0023fec commit fdf5ab3
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 0 deletions.
6 changes: 6 additions & 0 deletions tests/syntax_error/missing_end_quote_in_byte.jou
Original file line number Diff line number Diff line change
@@ -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
6 changes: 6 additions & 0 deletions tests/syntax_error/missing_end_quote_in_string.jou
Original file line number Diff line number Diff line change
@@ -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
8 changes: 8 additions & 0 deletions tests/syntax_error/string_continue_on_next_line.jou
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit fdf5ab3

Please sign in to comment.