mirror of
https://github.com/ProgramSnail/Lama.git
synced 2025-12-25 08:08: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
43
regression/orig/test045.log
Normal file
43
regression/orig/test045.log
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
> 49
|
||||
34
|
||||
97
|
||||
98
|
||||
99
|
||||
34
|
||||
91
|
||||
93
|
||||
91
|
||||
49
|
||||
44
|
||||
32
|
||||
50
|
||||
44
|
||||
32
|
||||
51
|
||||
93
|
||||
96
|
||||
99
|
||||
111
|
||||
110
|
||||
115
|
||||
32
|
||||
40
|
||||
49
|
||||
44
|
||||
32
|
||||
96
|
||||
99
|
||||
111
|
||||
110
|
||||
115
|
||||
32
|
||||
40
|
||||
50
|
||||
44
|
||||
32
|
||||
96
|
||||
110
|
||||
105
|
||||
108
|
||||
41
|
||||
41
|
||||
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)
|
||||
1
regression/test045.input
Normal file
1
regression/test045.input
Normal file
|
|
@ -0,0 +1 @@
|
|||
0
|
||||
Loading…
Add table
Add a link
Reference in a new issue