mirror of
https://github.com/ProgramSnail/Lama.git
synced 2025-12-24 15:48:47 +00:00
Added test for .string
This commit is contained in:
parent
1f564dbc5e
commit
9bc9967912
5 changed files with 65 additions and 7 deletions
12
regression/test045.expr
Normal file
12
regression/test045.expr
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
fun printString (s) local i {
|
||||
for i := 0, i < s.length, i := i + 1 do
|
||||
write (s[i])
|
||||
od
|
||||
}
|
||||
|
||||
x := read ();
|
||||
printString (1.string);
|
||||
printString ("abc".string);
|
||||
printString ([].string);
|
||||
printString ([1, 2, 3].string);
|
||||
printString (`cons (1, `cons (2, `nil)).string)
|
||||
Loading…
Add table
Add a link
Reference in a new issue