From ad80eaf88a112a312f1dc54e97f590a2a5a9a029 Mon Sep 17 00:00:00 2001 From: Ekaitz Zarraga Date: Thu, 25 Jan 2024 01:15:07 +0100 Subject: tests: clean and organize minimally --- tests/piece-table.scm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'tests/piece-table.scm') diff --git a/tests/piece-table.scm b/tests/piece-table.scm index 453229e..76176a9 100644 --- a/tests/piece-table.scm +++ b/tests/piece-table.scm @@ -13,8 +13,8 @@ (test-begin "insert") (define table (make-piece-table "HOLA")) (piece-table-insert! table 4 "9" 'normal) - (piece-table-insert! table 5 "0" 'normal) (test-equal #\9 (piece-table-index table 4)) + (piece-table-insert! table 5 "0" 'normal) (test-equal #\0 (piece-table-index table 5)) (test-equal "HOLA90" (piece-table->string table)) (piece-table-insert! table 5 "1" 'normal) @@ -36,6 +36,7 @@ (piece-table-insert! table 4 "\nHABLAMOS" 'normal) (test-equal "HOLA\nHABLAMOS\nADIOS" (piece-table->string table)) (test-equal (piece-table-line table 1) "HABLAMOS")) + ;; TODO: test line iteration functions (test-end "insert-newlines") (test-begin "delete") @@ -59,4 +60,4 @@ (test-equal c (string-ref "1234567890" i))) 0 10) -(test-end) +(test-end "for-each") -- cgit v1.2.3