diff options
author | Ekaitz Zarraga <ekaitz@elenq.tech> | 2024-01-06 20:09:24 +0100 |
---|---|---|
committer | Ekaitz Zarraga <ekaitz@elenq.tech> | 2024-01-06 20:09:24 +0100 |
commit | 2503388cfe7ef0e90a384095382f7e6180074cb5 (patch) | |
tree | 85570713ab8e1001ba4603f5c8a331b0fb6eb309 /tests |
Initial commit
Diffstat (limited to 'tests')
-rw-r--r-- | tests/piece-table.scm | 19 | ||||
-rwxr-xr-x | tests/run-tests.sh | 12 |
2 files changed, 31 insertions, 0 deletions
diff --git a/tests/piece-table.scm b/tests/piece-table.scm new file mode 100644 index 0000000..ecf57bc --- /dev/null +++ b/tests/piece-table.scm @@ -0,0 +1,19 @@ +(import (srfi 64) + (par piece-table)) + +;; https://srfi.schemers.org/srfi-64/srfi-64.html + + +(test-begin "index") + (define table (make-piece-table "HOLA" "" (list))) + (test-equal #\L (piece-table-index table 2)) +(test-end "index") + +(test-begin "insert") + (define table (make-piece-table "HOLA" "" (list))) + (piece-table-insert! table 2 #\9) + (test-equal #\9 (piece-table-index table 2)) +(test-end "insert") + +(test-begin "delete") +(test-end "delete") diff --git a/tests/run-tests.sh b/tests/run-tests.sh new file mode 100755 index 0000000..e9a543d --- /dev/null +++ b/tests/run-tests.sh @@ -0,0 +1,12 @@ +HERE=`dirname $0` +TESTS=$@ + +pushd "$HERE" +if [ -z "$TESTS" ]; then + TESTS=*.scm +fi + +for i in $TESTS; do + guile -L .. --r7rs "$i" +done +popd |