@@ -314,6 +314,41 @@ FFFFFFDC1616212121212121
314
314
--assert image? pos: find img 66
315
315
--assert 2 = index? pos
316
316
317
+ --test-- "APPEND on image"
318
+ ;@@ https://github.com/Oldes/Rebol-issues/issues/344
319
+ img: make image! 2x0
320
+ append img 170.170.170
321
+ --assert 2x0 = img/size ; size not updated yet as the row is not full
322
+ append img 187.187.187
323
+ --assert 2x1 = img/size ; size was updated now
324
+ --assert #{ AAAAAABBBBBB } = img/rgb
325
+ append img [1.1.1 2.2.2]
326
+ --assert #{ AAAAAABBBBBB010101020202 } = img/rgb
327
+
328
+ --test-- "INSERT on image"
329
+ img: make image! 2x0
330
+ --assert 1 = index? img
331
+ --assert 2 = index? insert img 170.170.170
332
+ --assert 2 = index? insert img 187.187.187
333
+ --assert 3 = index? tail img
334
+ --assert #{ BBBBBBAAAAAA } = img/rgb
335
+ --assert 3 = index? insert img [1.1.1 2.2.2]
336
+ --assert #{ 010101020202BBBBBBAAAAAA } = img/rgb
337
+
338
+ --test-- "INSERT/tail on image"
339
+ ;@@ https://github.com/Oldes/Rebol-issues/issues/783
340
+ img: make image! 2x0
341
+ img: insert tail img 170.170.170
342
+ --assert 2x0 = img/size ; size not updated yet as the row is not full
343
+ --assert tail? img
344
+ --assert empty? img/rgb
345
+ img: insert img 187.187.187
346
+ --assert 2x1 = img/size ; size was updated now
347
+ --assert tail? img
348
+ --assert empty? img/rgb
349
+ img: head img
350
+ --assert #{ AAAAAABBBBBB } = img/rgb
351
+
317
352
===end-group===
318
353
319
354
0 commit comments