summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorEkaitz Zarraga <ekaitz@elenq.tech>2024-03-09 00:09:11 +0100
committerEkaitz Zarraga <ekaitz@elenq.tech>2024-03-09 00:39:25 +0100
commit15551604c8eebf9404df561c7c6139dcf1d6a6a9 (patch)
treea1162dd290431b29cba549c2dd90e8967541e25a /tests
parent13e3354fff61c37555432d260a9b5d94ded4dd65 (diff)
src: piece-table: Add insert + tests for it
Diffstat (limited to 'tests')
-rw-r--r--tests/piece-table-insert.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/piece-table-insert.c b/tests/piece-table-insert.c
new file mode 100644
index 0000000..bed55bc
--- /dev/null
+++ b/tests/piece-table-insert.c
@@ -0,0 +1,10 @@
+#include "../src/piece-table.h"
+
+int main() {
+ piece_table pt;
+ init_piece_table(&pt, "1234567890");
+ insert_piece_table(&pt, 4, "abcdefgh", 8);
+ print_piece_table(&pt);
+ free_piece_table(&pt);
+ return 0;
+}