Added test for .string

This commit is contained in:
Dmitry Boulytchev 2018-10-31 21:48:44 +03:00 committed by danyaberezun
parent 1f564dbc5e
commit 9bc9967912
5 changed files with 65 additions and 7 deletions

View 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
View 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
View file

@ -0,0 +1 @@
0