Skip to content

Commit fe08fcb

Browse files
committed
TEST: fix with proper protected block value tests and added test for SWAP
1 parent aa183b9 commit fe08fcb

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/tests/units/protect-test.r3

+5-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ Rebol [
1111
===start-group=== "Checks if protected data are really protected"
1212
bin: #{cafe}
1313
str: "cafe"
14-
blk: "cafe"
14+
blk: ["cafe"]
1515
protect/values [bin str blk]
1616

1717
is-protected-error?: function[code][
@@ -35,6 +35,10 @@ Rebol [
3535
--test-- "random string" --assert is-protected-error? [random str]
3636
--test-- "random binary" --assert is-protected-error? [random bin]
3737

38+
--test-- "swap block" --assert is-protected-error? [swap blk [0]]
39+
--test-- "swap string" --assert is-protected-error? [swap str "0bad"]
40+
--test-- "swap binary" --assert is-protected-error? [swap bin #{0bad}]
41+
3842
===end-group===
3943

4044
~~~end-file~~~

0 commit comments

Comments
 (0)