diff options
author | Ekaitz Zarraga <ekaitz@elenq.tech> | 2024-01-08 15:49:14 +0100 |
---|---|---|
committer | Ekaitz Zarraga <ekaitz@elenq.tech> | 2024-01-08 15:53:01 +0100 |
commit | 3dcfb739029b53b224e4fc2a42458c88902b8290 (patch) | |
tree | d46ee9e71c87f6febe3795f022cbbdef57818e5a /tests | |
parent | 5508e9035c0d872ea24866788ede38a6dbcfecdf (diff) |
par: piece-table: rewrite insert to make it work
Diffstat (limited to 'tests')
-rw-r--r-- | tests/piece-table.scm | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/tests/piece-table.scm b/tests/piece-table.scm index d1fa32a..04a62bc 100644 --- a/tests/piece-table.scm +++ b/tests/piece-table.scm @@ -12,9 +12,13 @@ (test-begin "insert") (define table (make-piece-table "HOLA")) - (piece-table-insert! table 2 "90") - (test-equal #\9 (piece-table-index table 2)) - (test-equal #\0 (piece-table-index table 3)) + (piece-table-insert! table 4 "9" 'normal) + (piece-table-insert! table 5 "0" 'normal) + (test-equal #\9 (piece-table-index table 4)) + (test-equal #\0 (piece-table-index table 5)) + (test-equal "HOLA90" (piece-table->string table)) + (piece-table-insert! table 5 "1" 'normal) + (test-equal "HOLA910" (piece-table->string table)) (test-end "insert") (test-begin "delete") |