@@ -173,6 +173,57 @@ Rebol [
173
173
174
174
===end-group===
175
175
176
+ ;@@ https://github.com/Oldes/Rebol-issues/issues/1791
177
+ ===start-group=== "APPEND binary!"
178
+ --test-- "APPEND binary! binary!"
179
+ --assert #{ 0102 } = append #{ 01 } #{ 02 }
180
+ --assert #{ 0102 } = append next #{ 01 } #{ 02 }
181
+ --test-- "APPEND binary! string!"
182
+ --assert #{ 0001 } = append #{ 00 } "^(01) "
183
+ --assert #{ 0001 } = append next #{ 00 } "^(01) "
184
+ --assert #{ 00E28690 } = append #{ 00 } "^(2190) "
185
+ --assert #{ 00E28690 } = append next #{ 00 } "^(2190) "
186
+ --test-- "APPEND binary! file!"
187
+ --assert #{ 616263 } = append #{} %abc
188
+ --assert #{ C3A162 } = append #{} %áb
189
+ --test-- "APPEND binary! char!"
190
+ --assert #{ 0001 } = append #{ 00 } #"^(01)"
191
+ --assert #{ 00E28690 } = append #{ 00 } #"^(2190)"
192
+ --test-- "APPEND/part binary!"
193
+ --assert #{ 01 } = append /part #{} #{ 0102 } 1
194
+ --assert #{ 01 } = append /part #{} "^(01)^(02) " 1
195
+ --assert #{ E2 } = append /part #{} "^(2190) " 1 ;-- by design!
196
+ ===end-group===
197
+
198
+ ===start-group=== "INSERT binary!"
199
+ --test-- "INSERT binary! binary!"
200
+ --assert #{ 0201 } = head insert #{ 01 } #{ 02 }
201
+ --assert #{ 0102 } = head insert next #{ 01 } #{ 02 }
202
+ --test-- "INSERT binary! string!"
203
+ --assert #{ 0100 } = head insert #{ 00 } "^(01) "
204
+ --assert #{ 0001 } = head insert next #{ 00 } "^(01) "
205
+ --assert #{ E2869000 } = head insert #{ 00 } "^(2190) "
206
+ --assert #{ 00E28690 } = head insert next #{ 00 } "^(2190) "
207
+ --test-- "INSERT binary! file!"
208
+ --assert #{ 61626300 } = head insert #{ 00 } %abc
209
+ --assert #{ C3A16200 } = head insert #{ 00 } %áb
210
+ --test-- "INSERT binary! char!"
211
+ --assert #{ 0100 } = head insert #{ 00 } #"^(01)"
212
+ --assert #{ E2869000 } = head insert #{ 00 } #"^(2190)"
213
+ --test-- "INSERT/part binary!"
214
+ --assert #{ 0100 } = head insert /part #{ 00 } #{ 0102 } 1
215
+ --assert #{ 0100 } = head insert /part #{ 00 } "^(01)^(02) " 1
216
+ --assert #{ E200 } = head insert /part #{ 00 } "^(2190) " 1 ;-- by design!
217
+ ===end-group===
218
+
219
+ ===start-group=== "CHANGE binary!"
220
+ --test-- "CHANGE binary! string!"
221
+ --assert #{ E188B4 } = head change #{} "^(1234) "
222
+ --assert #{ E188B4 } = head change #{ 00 } "^(1234) "
223
+ --assert #{ E188B4 } = head change #{ 0000 } "^(1234) "
224
+ --assert #{ E188B403 } = head change/part #{ 010203 } "^(1234) " 2
225
+ ===end-group===
226
+
176
227
===start-group=== "TAKE"
177
228
--test-- "take string!"
178
229
s: "a"
0 commit comments