9
if length('abd')<>3 then bugmes();quit;end
11
if length(emptystr())<>0 then bugmes();quit;end
13
if or(length(['abd';emptystr()])<>[3;0]) then bugmes();quit;end
15
if or(length(string(ones(10,10)))<>1) then bugmes();quit;end
20
if part('abc',1)<>'a' then bugmes();quit;end
22
if part('abc',[1 1])<>'aa' then bugmes();quit;end
24
if part('abc',[1;1])<>'aa' then bugmes();quit;end
26
if part('abc',[])<>emptystr() then bugmes();quit;end
28
if part('abc',5)<>' ' then bugmes();quit;end
30
if part('abc',5:6)<>' ' then bugmes();quit;end
32
if or(part(['abc';'x'],1)<>['a';'x']) then bugmes();quit;end
34
if or(part(['abc';'x'],[1 1])<>['aa';'xx']) then bugmes();quit;end
36
//if or(part(['abc';'x'],[1 2])<>['aa';'x ']) then bugmes();quit;end
41
if string(1)<>'1' then bugmes();quit;end
43
if string(1.5)<>'1.5' then bugmes();quit;end
45
if string([])<>[] then bugmes();quit;end
47
if or(string(1:3)<>['1','2','3']) then bugmes();quit;end
49
if or(string([1;2;3])<>['1';'2';'3']) then bugmes();quit;end
51
if string('foo')<>'foo' then bugmes();quit;end
53
deff('y=mymacro(x)','y=x+1');
55
[out,in,text]=string(mymacro);
57
if out<>'y'|in<>'x'|text<>[] then bugmes();quit;end
59
mymacro=null();deff('y=mymacro(x)','y=x+1','n');
61
[out,in,text]=string(mymacro);
63
if out<>'y'|in<>'x'|text<>'y=x+1' then bugmes();quit;end
69
if convstr('ABC')<>'abc' then bugmes();quit;end
71
if convstr('ABC','l')<>'abc' then bugmes();quit;end
73
if convstr('ABC','u')<>'ABC' then bugmes();quit;end
75
if convstr(['ABC';'x'])<>['abc';'x'] then bugmes();quit;end
77
if convstr(['ABC';'x'],'l')<>['abc';'x'] then bugmes();quit;end
79
if convstr(['ABC';'x'],'u')<>['ABC';'X'] then bugmes();quit;end
82
if convstr('ABC')<>'abc' then bugmes();quit;end
84
if convstr('ABC','l')<>'abc' then bugmes();quit;end
86
if convstr('ABC','u')<>'ABC' then bugmes();quit;end
88
if convstr(['ABC','x'])<>['abc','x'] then bugmes();quit;end
90
if convstr(['ABC','x'],'l')<>['abc','x'] then bugmes();quit;end
92
if convstr(['ABC','x'],'u')<>['ABC','X'] then bugmes();quit;end
94
if convstr(emptystr())<>emptystr() then bugmes();quit;end
99
if or(str2code('abcdefghijklmnopqrstuvwxyz')<>(10:35)') then bugmes();quit;end
101
if or(str2code('ABCDEFGHIJKLMNOPQRSTUVWXYZ')<>-(10:35)') then bugmes();quit;end
103
if or(str2code('0123456789')<>(0:9)') then bugmes();quit;end
105
if str2code(emptystr())<>[] then bugmes();quit;end
112
if code2str(10:35)<>'abcdefghijklmnopqrstuvwxyz' then bugmes();quit;end
114
if code2str(-(10:35))<>'ABCDEFGHIJKLMNOPQRSTUVWXYZ' then bugmes();quit;end
116
if code2str(0:9)<>'0123456789' then bugmes();quit;end
118
if code2str([])<>emptystr() then bugmes();quit;end
124
[s]=sort(['abc','abd','aa','bxe']);
126
if or(s<>['aa','abc','abd','bxe']) then bugmes();quit;end
129
[s,k]=sort(['abc','abd','aa','bxe']);
131
if or(s<>['aa','abc','abd','bxe']) then bugmes();quit;end
133
if or(k<>[3 1 2 4]) then bugmes();quit;end
136
if sort('abc')<>'abc' then bugmes();quit;end
142
if strcat(['abc','abd','aa','bxe'])<>'abcabdaabxe' then bugmes();quit;end
144
if strcat(['abc','abd','aa','bxe'],',')<>'abc,abd,aa,bxe' then bugmes();quit;end
146
if strcat('abc')<>'abc' then bugmes();quit;end
148
if strcat('abc','sd')<>'abc' then bugmes();quit;end
153
if or(strindex('abc,abd,aa,bxe',',')<>[4 8 11]) then bugmes();quit;end
155
if or(strindex('abc',',')<>[]) then bugmes();quit;end
157
if or(strindex('abc,abd,aa,bxe',',a')<>[4 8]) then bugmes();quit;end
159
if or(strindex('abc,abd,aa,bxe','a')<>[1 5 9 10]) then bugmes();quit;end
161
//if or(strindex(emptystr(),'a'))<>[] then bugmes();quit;end
166
if strsubst('abc,abd,aa,bxe',',',';')<>'abc;abd;aa;bxe' then bugmes();quit;end
168
if strsubst('abc,abd,aa,bxe',',',emptystr())<>'abcabdaabxe' then bugmes();quit;end
170
if strsubst(',abc,abd,aa,bxe',',',emptystr())<>'abcabdaabxe' then bugmes();quit;end
172
if strsubst('abc',',',';')<>'abc' then bugmes();quit;end
177
if addf('1','1')<>'2' then bugmes();quit;end
179
if addf('1','0')<>'1' then bugmes();quit;end
181
if addf('0','1')<>'1' then bugmes();quit;end
183
if addf('0','0')<>'0' then bugmes();quit;end
185
if addf('1','-1')<>'0' then bugmes();quit;end
187
if addf('-1','1')<>'0' then bugmes();quit;end
189
if addf('-1','0')<>'-1' then bugmes();quit;end
191
if addf('0','-1')<>'-1' then bugmes();quit;end
194
if addf('1','a')<>'a+1' then bugmes();quit;end
196
if addf('a','1')<>'a+1' then bugmes();quit;end
198
if addf('a','0')<>'a' then bugmes();quit;end
200
if addf('0','a')<>'a' then bugmes();quit;end
202
if addf('a','-1')<>'a-1' then bugmes();quit;end
204
if addf('-1','a')<>'a-1' then bugmes();quit;end
206
if addf('a','b')<>'a+b' then bugmes();quit;end
208
if addf('a+b','c')<>'a+b+c' then bugmes();quit;end
210
if addf('c','a+b')<>'c+a+b' then bugmes();quit;end
212
if addf('a+b','a+b')<>'a+b+a+b' then bugmes();quit;end
214
if addf('a+b','a-b')<>'a+a' then bugmes();quit;end
216
if addf('2*a+b','a-b')<>'2*a+a' then bugmes();quit;end
219
if mulf('1','1')<>'1' then bugmes();quit;end
221
if mulf('1','0')<>'0' then bugmes();quit;end
223
if mulf('0','1')<>'0' then bugmes();quit;end
225
if mulf('0','0')<>'0' then bugmes();quit;end
227
if mulf('1','-1')<>'-1' then bugmes();quit;end
229
if mulf('-1','1')<>'-1' then bugmes();quit;end
231
if mulf('-1','0')<>'0' then bugmes();quit;end
233
if mulf('0','-1')<>'0' then bugmes();quit;end
236
if mulf('1','a')<>'a' then bugmes();quit;end
238
if mulf('a','1')<>'a' then bugmes();quit;end
240
if mulf('a','0')<>'0' then bugmes();quit;end
242
if mulf('0','a')<>'0' then bugmes();quit;end
244
if mulf('a','-1')<>'-a' then bugmes();quit;end
246
if mulf('-1','a')<>'-a' then bugmes();quit;end
248
if mulf('a','b')<>'a*b' then bugmes();quit;end
250
if mulf('a+b','c')<>'(a+b)*c' then bugmes();quit;end
252
if mulf('c','a+b')<>'c*(a+b)' then bugmes();quit;end
254
if mulf('a+b','a+b')<>'(a+b)*(a+b)' then bugmes();quit;end
256
if mulf('2*a+b','a-b')<>'(2*a+b)*(a-b)' then bugmes();quit;end