test: C trigraph
add a test file that checks that C trigraphs in string literals are not miscompiled.
This commit is contained in:
parent
b1f2fcf758
commit
995725b256
2 changed files with 21 additions and 0 deletions
12
tests/compiler/trigraphs.lean
Normal file
12
tests/compiler/trigraphs.lean
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
/-! Tests that C trigraphs are not actually interpreted -/
|
||||
|
||||
def main := do
|
||||
IO.println "??("
|
||||
IO.println "??)"
|
||||
IO.println "??<"
|
||||
IO.println "??>"
|
||||
IO.println "??="
|
||||
IO.println "??/"
|
||||
IO.println "??'"
|
||||
IO.println "??!"
|
||||
IO.println "??-"
|
||||
9
tests/compiler/trigraphs.lean.expected.out
Normal file
9
tests/compiler/trigraphs.lean.expected.out
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
??(
|
||||
??)
|
||||
??<
|
||||
??>
|
||||
??=
|
||||
??/
|
||||
??'
|
||||
??!
|
||||
??-
|
||||
Loading…
Add table
Reference in a new issue