Skip to content

Commit

Permalink
TESTS: add REPLACE tests for issue red#4174.
Browse files Browse the repository at this point in the history
  • Loading branch information
9214 committed Aug 21, 2020
1 parent affe57d commit 2b57543
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions tests/source/units/replace-test.red
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ Red [
--test-- "replace/deep-4" --assert [1 2 3 [8]] = replace/deep [1 2 3 [4 5]] [quote 4 quote 5] 8
--test-- "replace/deep-5" --assert [1 2 a 4 5] = replace/deep [1 2 3 4 5] [quote 8 | quote 4 | quote 3] 'a
--test-- "replace/deep-6" --assert [a g h c d] = replace/deep [a b c d] ['b | 'd] [g h]
--test-- "replace/deep-7" --assert [x: 1 2 3] = replace/deep [a: 1 2 3] quote a: quote x:

===end-group===

Expand All @@ -53,6 +54,7 @@ Red [
--test-- "replace/all-7" --assert #{640164} = replace/all #{000100} #{00} #{64}
--test-- "replace/all-8" --assert %file.sub.ext = replace/all %file!sub!ext #"!" #"."
--test-- "replace/all-9" --assert <tag body end> = replace/all <tag_body_end> "_" " "
--test-- "replace-all-10" --assert [x: 123] = replace/all [a: 123] quote a: quote x:

===end-group===

Expand All @@ -62,6 +64,7 @@ Red [
--test-- "replace/deep/all-2" --assert [1 8 9 3 [4 8 9]] = replace/deep/all [1 2 3 [4 5]] [quote 5 | quote 2] [8 9]
--test-- "replace/deep/all-3" --assert [i j c [i j]] = replace/deep/all [a b c [d e]] ['d 'e | 'a 'b] [i j]
--test-- "replace/deep/all-4" --assert [a [<tag> [<tag>]]] = replace/all/deep [a [b c [d b]]] ['d 'b | 'b 'c] <tag>
--test-- "replace/deep/all-5" --assert [x: 123 [x: 123]] = replace/all/deep [a: 123 [a: 123]] quote a: quote x:

===end-group===

Expand Down

0 comments on commit 2b57543

Please sign in to comment.