File tree 1 file changed +8
-3
lines changed
1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -320,11 +320,16 @@ Rebol [
320
320
321
321
--test-- "reduce/only"
322
322
;@@ https://github.com/Oldes/Rebol-issues/issues/359
323
- --assert [1 # [unset] 2 ] = reduce /only [1 no-such-word 2 ] []
324
- --assert [1 # [unset] 2 ] = reduce /only [1 no-such-word 2 ] none
325
- --assert [1 some-word 2 ] = reduce /only [1 some-word 2 ] [some-word]
323
+ --assert [1 2 ] = reduce /only [1 2 ] []
324
+ --assert [1 2 ] = reduce /only [1 2 ] none
326
325
--assert native? second reduce /only [1 now 2 ] none
327
326
--assert word? second reduce /only [1 now 2 ] [now]
327
+ ; it is not allowed to have unset reduced using reduce/only anymore!
328
+ ;@@ https://github.com/Oldes/Rebol-issues/issues/1771
329
+ --assert all [error? e: try [ reduce /only [1 no-such-word 2 ] [] ] e/id = 'no-value]
330
+ --assert all [error? e: try [ reduce /only [1 no-such-word 2 ] none ] e/id = 'no-value]
331
+ ; if the word is listed in the /only value, than it is ok:
332
+ --assert [1 no-such-word 2 ] = reduce /only [1 no-such-word 2 ] [no-such-word]
328
333
329
334
--test-- "reduce/into"
330
335
;@@ https://github.com/Oldes/Rebol-issues/issues/506
You can’t perform that action at this time.
0 commit comments