1
0
mirror of https://github.com/janet-lang/janet synced 2025-09-10 23:06:08 +00:00

Added misc tests to increase test coverage

This commit is contained in:
Ico Doornekamp
2023-06-03 18:59:19 +02:00
parent 15177ac2e9
commit c0f5f97ddb
8 changed files with 143 additions and 2 deletions

View File

@@ -68,5 +68,15 @@
"trace to custom err function")
(assert (deep= @"trace (dummy 1 2 3)\n" b) "trace buffer correct"))
# xprintf
(def b @"")
(defn to-b [a] (buffer/push b a))
(xprintf to-b "123")
(assert (deep= b @"123\n") "xprintf to buffer")
(assert-error "cannot print to 3" (xprintf 3 "123"))
(end-suite)