/
regression-test-red.red
3676 lines (3003 loc) · 76.9 KB
/
regression-test-red.red
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
Red [
Title: "Red regression tests"
Author: "Boleslav Březovský"
File: %regression-test.red
Tabs: 4
License: "BSD-3 - https://github.com/red/red/blob/origin/BSD-3-License.txt"
; Needs: 'View
]
#include %../../../quick-test/quick-test.red
;true?: func [value] [not not value]
;-test-: :--test--
;--test--: func [value] [probe value -test- value]
~~~start-file~~~ "regression-test"
===start-group=== "issues #1 - #1000"
true?: func [value] [not not value]
; --test-- "#5"
; --test-- "#63"
; TODO
; --test-- "#65"
; TODO
; --test-- "#71"
; TODO
; --test-- "#114"
; TODO
; --test-- "#117"
; TODO
; --test-- "#121"
; TODO
; --test-- "#122"
; TODO
; --test-- "#123"
; TODO
; --test-- "#125"
; TODO
; --test-- "#131"
; TODO
; --test-- "#134"
; TODO
; --test-- "#137"
; TODO
; --test-- "#153"
; TODO
; --test-- "#154"
; TODO
; --test-- "#157"
; TODO
; --test-- "#165"
; TODO
; --test-- "#167"
; TODO
; --test-- "#168"
; specific compiler version problem
; --test-- "#170"
; TODO
; --test-- "#172"
; TODO
; --test-- "#174"
; TODO
; --test-- "#178"
; TODO
; --test-- "#188"
; TODO
; --test-- "#200"
; quick-test bug
; --test-- "#204"
; no code
; --test-- "#212"
; NOTE: float! problem on ARM - there is ton of other float! tests
; that will test this as well
; --test-- "#228"
; TODO
; --test-- "#234"
; TODO
; --test-- "#236"
; TODO
; --test-- "#239"
; TODO
; --test-- "#250"
; TODO
; --test-- "#258"
; TODO
--test-- "#262"
--assert not error? try [#"^(00)"]
; --test-- "#265"
; NOTE: problem with compiling %tests/hello.red on Linux/ARM
; --test-- "#269"
; TODO
; --test-- "#278"
; TODO
; --test-- "#279"
; TODO
--test-- "#292"
--assert error? try [load {#"""}]
--test-- "#306"
s306: mold []
--assert equal? #"[" s306/1
--test-- "#308"
; NOTE: using just `foo` won't compile -- see #2207
bar308: func [] [foo308]
foo308: func [] [42]
--assert not error? try [bar308]
unset [foo308 bar308]
--test-- "#310"
--assert equal? "good" either true ["good"] ["bad"]
--assert equal? "good" either false ["bad"] ["good"]
--assert equal? "good" either 42 ["good"] ["bad"]
; --test-- "#313"
; TODO
; --test-- "#316"
; TODO
--test-- "#321"
--assert none? if false [1]
--assert error? try [1 + if false [2]]
; --test-- "#324"
; NOTE: seems to be buggy still
; --test-- "#330"
; TODO
; not sure what is the buggy behaviour, there’s no example
--test-- "#331"
foo331: func [] ["ERR"]
foo331: func [] ["ok"]
--assert equal? "ok" foo331
; --test-- "#340"
; TODO
; --test-- "#342"
; TODO
--test-- "#345"
spec345: spec-of :set
--assert (index? find spec345 'value) < ((index? find spec345 /any))
--test-- "#356"
--assert not error? try [if true []]
; --test-- "#357"
; TODO
; --test-- "#360"
; TODO: OPEN
; should check for compilation error
; --test-- "#364"
; TODO: #include problem
; --test-- "#366"
; TODO: compilation problem with dir paths
; --test-- "#381"
; TODO: #include problem
--test-- "#384"
f384: func [/refine] [refine]
--assert not f384
; --test-- "#385"
; TODO
--test-- "#388"
--assert equal? word! type? 'a
comment { print should be mocked for this test
--test-- "#389"
--assert equal?
"default"
switch/default 1 [
2 [
print 2
]
][
"default"
]
}
--test-- "#395"
--assert switch 'yes [yes [true]]
--test-- "#397"
--assert not error? try [do [append [] 1]]
--test-- "#399"
x399: 1
f399: function [
][
x399: 2
b: [x399]
do b
]
--assert equal? 2 f399
--test-- "#400"
r400: none
t400: none
r400: all [
any [
true
t400: "*"
true
]
]
--assert none? t400 ; `any` short-circuits on 1st true
--assert true? r400
r400: none
t400: none
--assert true? all [
any [
false
t400: "*"
true
]
r400: "!"
]
--assert equal? t400 "*"
--assert equal? r400 "!"
r400: none
t400: none
--assert true? all [
any [
none
t400: "*"
true
]
r400: "!"
]
--assert equal? t400 "*"
--assert equal? r400 "!"
unset [r400 t400]
--test-- "#401"
y401: none ; prevent " undefined word y401" compiler error
set 'x 'y401
set x 1
--assert equal? 1 y401
do [set x 1]
--assert equal? 1 y401
unset [x y401]
--test-- "#403"
f403: func [
a [block!]
return: [block!]
/local b x
][
b: copy []
either block? x: a/1 [
append/only b f403 x
][
append b x
]
b
]
--assert equal? [1] f403 [1]
--assert equal? [[2]] f403 [[2]]
--assert equal? [[[3]]] f403 [[[3]]]
unset 'f403
--test-- "#404"
x404: 'y404
y404: 1
--assert equal? 'y404 x404
--assert equal? 'y404 get 'x404
--assert equal? 1 get x404
--assert equal? 1 do [get x404]
--test-- "#409"
g409: func [
b [block!]
] [
reduce [b do b]
]
f409: func [
"!"
x
/r
] [
g409 [x]
]
--assert equal? [[x] "!"] f409 "!"
; --test-- "#411"
; TODO
; --test-- "#413"
; TODO: should check compilation time
--test-- "#416"
b416: [none]
f416: func [p q] [
reduce [p q]
]
--assert equal? [1 none] do [f416 1 b416/1]
unset [b416 f416]
; --test-- "#418"
; see #420
--test-- "#422"
--assert not error? try [function [n [integer!]] []]
--test-- "#424"
--assert empty? load ";2"
--test-- "#425"
--assert not error? try [func [return: [integer!]] []]
; --test-- "#426"
; compiler behaviour
--test-- "#427"
out427: copy ""
f427: func [
/local count
] [
repeat count 5 [
append out427 count
]
]
f427
--assert equal? "12345" out427
unset 'out427
--test-- "#429"
--assert equal? {#"^^-"} mold tab
--test-- "#430"
--assert equal? " x" form ["" [] x]
--assert equal? " a a " form [[""] [a] [] [a] [[[]]]]
comment { print should be mocked for this test
--test-- "#431"
--assert error? try [val431: print ""]
unset 'val431
}
; --test-- "#432"
; TODO
--test-- "#443"
unset [i j]
f443: function [] [out: copy [] foreach [i j] [1 2 3 4] [append out i] out]
--assert equal? [1 3] f443
--assert equal? [/local out i j] spec-of :f443
--assert error? try [do [i]]
--assert error? try [do [j]]
unset [f443 out]
--test-- "#449"
s449: copy ""
--assert equal? "1111111111" append/dup s449 #"1" 10
--assert equal? "1111111111" s449
--assert equal? 10 length? s449
unset 's449
--test-- "#455"
types455: copy []
foreach word words-of system/words [
all [
value? word
append types455 type? get word
]
]
--assert 1 < length? unique types455
unset 'types455
--test-- "#457"
--assert equal? "b" find/tail "a/b" #"/"
--assert equal? "/b" find "a/b" #"/"
--test-- "#458"
--assert equal? "[a [b] c]" mold [a [b] c]
--assert equal? "a [b] c" mold/only [a [b] c]
--test-- "#459"
--assert equal? [3 7 8] find/last [1 2 3 4 5 6 3 7 8] 3
--assert equal? [7 8] find/last/tail [1 2 3 4 5 6 3 7 8] 3
--assert equal? "378" find/last "123456378" #"3"
--assert equal? "78" find/last/tail "123456378" #"3"
--test-- "#465"
s465: make string! 0
append s465 #"B"
--assert equal? "B" s465
append s465 #"C"
--assert equal? "BC" s465
append s465 #"D"
--assert equal? "BCD" s465
; --test-- "#484"
; TODO
; --test-- "#488"
; Rebol GC bug (probably, TODO)
--test-- "#490"
--assert equal? "" insert "" #"!"
--assert equal? "" insert "" "!"
--test-- "#491"
--assert equal? 2 load next "1 2"
; --test-- "#493"
; TODO
; --test-- "#494"
; TODO: example throws strange compiler error
--test-- "#497"
b: [1]
p: 'b/1
--assert equal? 1 do p
--test-- "#498"
--assert equal? {{""}} mold mold {}
--test-- "#501"
--assert empty? at tail "abc" 0
--test-- "#505"
--assert equal? "ab" find/reverse tail "ab" #"a"
; --test-- "#507"
; R2 GC bug
; --test-- "#508"
; R2 GC bug
; --test-- "#509"
; R2 GC bug
--test-- "#510"
set [x] []
--assert none? x
--test-- "#511"
b511: [x 0]
i511: 'x
b511/:i511: 1
--assert equal? [x 1] b511
unset [b511 i511]
--test-- "#512"
x512: 0
--assert zero? case [yes x512]
unset 'x512
--test-- "#513"
--assert equal? {#"^^^^"} mold #"^^"
--test-- "#514"
--assert equal? 1 length? "^^"
--assert equal? {"^^^^"} mold "^^"
; --test-- "#515"
; no example
; --test-- "#518"
; TODO
; --test-- "#519"
; TODO: see #2225
; should check print output
--test-- "#520"
; FIXME: disputable -- see the issue
;--assert not not all []
--test-- "#522"
--assert not error? try [{{x}}]
--test-- "#524"
s524: "^(1234)B"
--assert equal? "B" find s524 "B"
--assert equal? "B" find s524 next "AB"
unset 's524
--test-- "#525"
--assert not error? try [load {^/}]
--assert not error? try [load {{^/}}]
; --test-- "#531"
; TODO: should check for compiler error
; --test-- "#532"
; TODO
; --test-- "#539"
; TODO: #inlcude path problem
; --test-- "#541"
; TODO: compiler problem
; --test-- "#542"
; precompiled library problem
; --test-- "#545"
; broken library
; --test-- "#547"
; broken release
; --test-- "#548"
; TODO: #include path problem
--test-- "#558"
o558: copy ""
foreach x 'a/b/c [append o558 x]
--assert equal? o558 "abc"
o558: copy ""
foreach x quote (i + 1) [append o558 x]
--assert equal? o558 "i+1"
unset 'o558
--test-- "#559"
--assert equal? load "x559/y:" quote x559/y:
--assert equal? load "x559:" quote x559:
--test-- "#560"
fx560: function [
value
out [string!]
][
either block? value [
string: copy ""
foreach x value [
fx560 x tail string
]
insert insert insert out 0 string #"]"
out
][
insert insert insert insert out 1 #":" value #","
out
]
]
fx560 [a [b c d]]
s560: ""
--assert equal? "01:a,01:b,1:c,1:d,]]" s560
unset [fx560 s560]
--test-- "#562"
--assert not parse "+" [any [#"+" if (no)]]
--test-- "#569"
size569: 1
--assert equal? ["1"] parse "1" [collect [keep copy value size569 skip]]
size569: 2
--assert equal? ["12"] parse "12" [collect [keep copy value size569 skip]]
unset 'size569
--test-- "#570"
--assert not strict-equal? 'a 'A
--assert not strict-equal? 'test 'Test
--test-- "#572"
;-- NOTE: `sp` is space char, shouldn't override it
sp572: func [x y] [return parse "aa" [collect [keep skip]]]
--assert equal? [#"a"] sp572 "q" "w"
sp572: func [x y] [parse "aa" [collect [keep skip]]]
--assert equal? [#"a"] sp572 "q" "w"
unset 'sp572
--test-- "#573"
--assert error? try [load "{"]
--test-- "#581"
--assert not error? try [do "S: 1 S"]
; --test-- "#584"
; console behaviour
--test-- "#586"
t586: reduce [block!]
--assert equal? reduce [block!] find/only t586 block!
--assert equal? reduce [block!] find/only t586 type? []
unset 't586
--test-- "#592"
--assert file? %x
--assert file? copy %x
--test-- "#593"
--assert equal? [#"1"] parse "12" [collect [keep skip]]
--assert equal? ["1"] parse "12" [collect [keep copy x skip]]
--assert equal? [#"1"] parse "12" [collect [keep skip]]
--test-- "#594"
count594: 0
letter594: charset [#"a" - #"z" #"A" - #"Z"]
rule594: [
some [
"end" end (count594: count594 + 1)
| letter594
]
]
--assert parse "blahendslkjsfdend" rule594
--assert 1 = count594
unset [count594 letter594 rule594]
--test-- "#596"
list596: ""
parse "a" [collect into list596 some [keep skip]]
--assert equal? "a" head list596
unset 'list596
--test-- "#598"
--assert equal? [""] parse "" [collect [(s: "") collect into s [] keep (s)]]
--assert equal? [[]] parse [] [collect [(b: []) collect into b [] keep (b)]]
unset [b s]
--test-- "#599"
--assert equal? "<?>" form ["<?>"]
--assert equal? "<?>" append "" ["<?>"]
--assert equal? "<?>" head insert "" ["<?>"]
--test-- "#601"
b601: [] parse "!" [collect into b601 [keep 0 skip]]
--assert empty? head b601
unset 'b601
--test-- "#604"
--assert equal? "_" form "_"
--assert equal? "_" form #"_"
--test-- "#605"
--assert none? length? none
--assert error? try [1 + none] ; #621
; --test-- "#609"
; console behaviour
--test-- "#616"
; NOTE: 'f must be function (as defined elswhere in this tests),
; otherwise tests can’t be compiled, so we use 'fis616 here instead
; same with g->gis616
e616: copy ""
fis616: [b_c c_d]
append e616 fis616
--assert equal? "b_cc_d" e616
a616: copy ""
c616: [glp_set_prob_name glp_get_prob_name]
append a616 c616
--assert equal? "glp_set_prob_nameglp_get_prob_name" a616
b616: copy ""
d616: load "glp_set_prob_name glp_get_prob_name"
append b616 d616
--assert equal? "glp_set_prob_nameglp_get_prob_name" b616
gis616: copy ""
h616: [bc cd]
append gis616 h616
--assert equal? "bccd" gis616
unset [a616 b616 c616 d616 e616 fis616 gis616 h616]
--test-- "#625"
--assert equal? #"^(1F)" first "^(1f)"
; --test-- "#626"
; see #637
--test-- "#628"
--assert equal? "make objec" mold/part context [a: "1" b: "2"] 10
; --test-- "#644"
; TODO: how to check for hangup?
--test-- "#645"
not error? try [
comment [
1 + 1
]
]
--test-- "#646"
--assert not error? try [foreach x646 [] []]
--test-- "#647"
--assert error? try [load "type? quote '1" ]
--test-- "#650"
do [ ;-- interpreter only, compiler case is in compiler regression tests.
f650: func [/1][none]
--assert error? try [f650/1]
]
--test-- "#651"
--assert equal? [1 []] load "1[]"
--assert equal? [[] 1] load "[]1"
; --test-- "#653"
; TODO: need to check header
--test-- "#655"
--assert none? load "#(none)"
--test-- "#656"
--assert not error? try [load "+1"]
--test-- "#657"
--assert equal? {"} "^""
; --test-- "#660"
; console building problem
--test-- "#678"
--assert parse "cat" [1 "cat"]
--assert not parse "cat" [2 "cat"]
--assert not parse "cat" [3 "cat"]
--assert not parse "cat" [4 "cat"]
; --test-- "#682"
; TODO
; --test-- "#687"
; console behaviour
; --test-- "#696"
; console behaviour
--test-- "#699"
letter699: charset "ABCDEF"
--assert parse "FFh" [2 8 letter699 #"h"]
--test-- "#702"
--assert not error? try [
command702: [
if-defined | if-not-defined | define | function | comment
]
]
unset 'command702
; --test-- "#704"
; console behaviour
; --test-- "#706"
; console behaviour
--test-- "#710"
; FIXME: not sure if both test should work or both should throw an error.
; first tests works with 061, while second does not
--assert equal?
1.373691897708523e131
do load "27847278432473892748932789483290483789743824832478237843927849327492 * 4932948478392784372894783927403290437147389024920147892940729142"
; I've changed this, see issue #710 -- hiiamboris
--assert error? try [74789 * 849032]
;--assert not error? try [74789 * 849032]
--test-- "#714"
a714: load/all "a714"
b714: load/all "b714"
--assert equal? [a714] a714
--assert equal? [b714] b714
--test-- "#715"
--assert equal? "blahblah2" append "blah" "blah^2"
; --test-- "#716"
; platfor specific compilation problem
; --test-- "#720"
; console compilation problem
--test-- "#725"
--assert not equal? load {"Español"} "Espa^^(F1)ol"
--test-- "#726"
--assert equal? load {{^(line)}} "^/"
--test-- "#727"
x727: 0
rule727: [(x727: 1)]
parse "a" [collect rule727]
--assert equal? 1 x727
unset 'x727
--test-- "#734"
foo: quote 'bar
--assert lit-word? quote 'bar
--assert lit-word? foo
--assert lit-word? :foo
unset 'foo
--test-- "#757"
--assert not error? try [x757: "^(FF)"]
unset 'x757
--test-- "#764"
; NOTE: some test cannot be compiled, because compiler refuses them
f764: function[][os764: 1]
--assert equal? 1 f764
f764: function[][os764: 1 os764]
--assert equal? 1 f764
f764: function[os764][os764]
--assert equal? 1 f764 1
f764: func[][os764: 1]
--assert equal? 1 f764
f764: func[][os764: 1 os764]
--assert equal? 1 f764
f764: func[os764][os764]
--assert equal? 1 f764 1
unset 'os764
; FIXME: only -t Linux compiler complains about equal? 1 os=unset
f764: has [os764][os764: 1]
--assert equal? 1 f764
--assert error? do [try [equal? 1 os764]]
unset 'os764
f764: has [os764][os764: 1 os764]
--assert equal? 1 f764
--assert error? do [try [equal? 1 os764]]
f764: does [os764: 1]
--assert equal? 1 f764
f764: does [os764: 1 os764]
--assert equal? 1 f764
unset [f764 os764]
--test-- "#770"
f770: function [][
blk: [1 2 3 4 5]
foreach i blk [
case [
i > 1 [return i]
]
]
]
g770: function [][if f770 [return 1]]
--assert equal? 1 g770
f770: function [][
case [
2 > 1 [return true]
]
]
g770: function [][if f770 [return 1]]
--assert equal? 1 g770
f770: function [][if true [return true]]
g770: function [][if f770 [return 1]]
--assert equal? 1 g770
g770: function [][if true [return 1]]
--assert equal? 1 g770
f770: function [][true ]
g770: function [][if f770 [return 1]]
--assert equal? 1 g770
f770: function [][if true [return true]]
g770: function [][if (f770) [return 1]]
--assert equal? 1 g770
f770: function [][if true [return true]]
g770: function [][if not not f770 [return 1]]
--assert equal? 1 g770
f770: function [][if true [return 'X]]
g770: function [][if f770 [return 1]]
--assert equal? 1 g770
unset [f770 g770]
; --test-- "#776"
; console behaviour
--test-- "#785"
nd785: charset [not #"0" - #"9"]
zero785: charset #"0"
nd-zero785: union nd785 zero785
--assert not find nd785 #"0"
--assert not find nd785 #"1"
--assert find nd785 #"B"
--assert find nd785 #"}"
--assert find zero785 #"0"
--assert not find zero785 #"1"
--assert not find zero785 #"B"
--assert not find zero785 #"}"
--assert find nd-zero785 #"0"
--assert not find nd-zero785 #"1"
--assert find nd-zero785 #"B"
--assert find nd-zero785 #"}"
unset [nd785 zero785 nd-zero785]
--test-- "#787"
--assert equal? ["a"] head reduce/into "a" []
--test-- "#789"
--assert not error? try [load "-2147483648"]
--test-- "#791"
blk791: [2 #(none) 64 #(none)]
result791: copy []
parse blk791 [
collect into result791 [
any [
set s integer! keep (s) | skip
]
]
]
--assert equal? [2 64] result791
--assert not tail? result791
--assert equal? [2 64] head result791
unset [blk791 result791]
; --test-- "#796"
; console behaviour
; --test-- "#800"
; console behaviour (ask)
; --test-- "#806"
; precompiled console problem
; --test-- "#817"
; TODO: need more info
; --test-- "#818"
; TODO: need more info
--test-- "#825"
the-text825: "outside"
the-fun825: function [] [the-text825: "Hello, World!" print the-text825]
--assert equal? spec-of :the-fun825 [/local the-text825]
the-fun825: func [] [the-text825: "Hello, World!" print the-text825]
--assert equal? spec-of :the-fun825 []
the-fun825: function [/extern the-text825] [the-text825: "Hello, World!" print the-text825]
--assert equal? spec-of :the-fun825 []
the-fun825: func [/local the-text825] [the-text825: "Hello, World!" print the-text825]
--assert equal? spec-of :the-fun825 [/local the-text825]
the-fun825: func [extern the-text825] [the-text825: "Hello, World!" print the-text825]
--assert equal? spec-of :the-fun825 [extern the-text825]
the-fun825: func [local the-text825] [the-text825: "Hello, World!" print the-text825]
--assert equal? spec-of :the-fun825 [local the-text825]
unset [the-text825 the-fun825]
; --test-- "#831"
; FIXME: not fixed yet, crashes compiler, see #2207
; f: function [][1]
; f: function [][1]
; f: 100
; --assert not equal? f 100
--test-- "#849"
--assert equal? 1.2 1.2
--assert equal? "ščř" "ščř"
--assert equal? 1.2 1.2
--assert equal? -1.0203 -1.0203
--test-- "#853"
the-text853: "outside"
the-fun853: function [
/extern the-text853
] [