scanning directories for unit tests...
scanning present working directory for unit tests...
found unit tests: (prelude-spec.scm modules-spec.scm)
running unit tests from file: prelude-spec.scm, entrypoint: spec
------------------------------------------
[suite] Another test suite
[test] html-unescape tests
[assert] Multiple entity occurrences
[pass] expect: It's a "quote"., got: It's a "quote".
[assert] C-cedilla entity
[pass] expect: ?, got: ?
[assert] Single apos entity
[pass] expect: ', got: '
[assert] Accented A entity
[pass] expect: ?, got: ?
[assert] Empty string
[pass] expect: , got:
[assert] Single quot entity
[pass] expect: ", got: "
[assert] Accented a entity
[pass] expect: ?, got: ?
[assert] Mix of entities
[pass] expect: He's a "guy"., got: He's a "guy".
[assert] String with no entities
[pass] expect: Hello, World!, got: Hello, World!
[assert] Example sentence unescaped
[pass] expect: ?l?, m?ndo! Isto ? um teste., got: ?l?, m?ndo! Isto ? um teste.
[test] html-escape tests
[assert] Accented O
[pass] expect: Ó, got: Ó
[assert] String with multiple occurrences
[pass] expect: He said, "It's a beautiful day!", got: He said, "It's a beautiful day!"
[assert] Double quote
[pass] expect: ", got: "
[assert] C-cedilla
[pass] expect: ç, got: ç
[assert] Accented I
[pass] expect: Í, got: Í
[assert] Mix of quotes
[pass] expect: He's a "guy"., got: He's a "guy".
[assert] Accented U
[pass] expect: Ú, got: Ú
[assert] Empty string
[pass] expect: , got:
[assert] String with no special characters
[pass] expect: Hello, World!, got: Hello, World!
[assert] Accented u
[pass] expect: ú, got: ú
[assert] Accented E
[pass] expect: É, got: É
[assert] N-tilde
[pass] expect: ñ, got: ñ
[assert] Multiple accents
[pass] expect: Árvore é bonita, got: Árvore é bonita
[assert] Example sentence escaped
[pass] expect: Ólá, múndo! Isto é um teste., got: Ólá, múndo! Isto é um teste.
[assert] Accented i
[pass] expect: í, got: í
[assert] Single quote
[pass] expect: ', got: '
[assert] Accented o
[pass] expect: ó, got: ó
[test] sha tests
[assert] get-short-commit-sha works as expected
[pass] expect: #t, got: #t
[test] Round-trip tests
[assert] Escape then unescape
[pass] expect: Hello, it's a "test" with ?????., got: Hello, it's a "test" with ?????.
[assert] Unescape then escape round-trips the significant characters
[pass] expect: <div>'test'</div>, got: <div>'test'</div>
[assert] Unescape then escape (for chars in alist)
[pass] expect: 'áéíóú", got: 'áéíóú"
[assert] Example sentence
[pass] expect: Ol?, m?ndo! Isto ? um teste., got: Ol?, m?ndo! Isto ? um teste.
------------------------------------------
[suite] SQL statement builder
[test] #:dialect decides how identifiers are delimited
[assert] an unknown dialect is rejected
[pass] expect: rejected, got: rejected
[assert] the default is still ANSI quoting
[pass] expect: SELECT "id" FROM "users" WHERE "id" = ?, got: SELECT "id" FROM "users" WHERE "id" = ?
[assert] and so do the other builders
[pass] expect: (UPDATE `users` SET `name` = ? WHERE `id` = ? DELETE FROM `users` WHERE `id` = ?), got: (UPDATE `users` SET `name` = ? WHERE `id` = ? DELETE FROM `users` WHERE `id` = ?)
[assert] quote-sql-identifier switches delimiter on request
[pass] expect: ("id" `id`), got: ("id" `id`)
[assert] MySQL uses backticks, not double quotes
[pass] expect: SELECT `id`, `name` FROM `users` WHERE `id` = ? LIMIT ?, got: SELECT `id`, `name` FROM `users` WHERE `id` = ? LIMIT ?
[test] SELECT with every clause
[assert] a lone OFFSET numbers from the first free slot
[pass] expect: SELECT * FROM "users" OFFSET $1, got: SELECT * FROM "users" OFFSET $1
[test] INSERT ... RETURNING
[assert] a column list is quoted
[pass] expect: INSERT INTO "users" ("name") VALUES (?) RETURNING "id", got: INSERT INTO "users" ("name") VALUES (?) RETURNING "id"
[assert] the star stays unquoted
[pass] expect: INSERT INTO "users" ("name") VALUES (?) RETURNING *, got: INSERT INTO "users" ("name") VALUES (?) RETURNING *
[test] upsert: misuse is reported
[assert] a conflict target that is not in the rows
[pass] expect: rejected, got: rejected
[assert] MySQL has no conflict target to give
[pass] expect: rejected, got: rejected
[assert] MySQL has no DO NOTHING
[pass] expect: rejected, got: rejected
[assert] an unknown dialect
[pass] expect: rejected, got: rejected
[assert] ON CONFLICT DO UPDATE needs a target
[pass] expect: rejected, got: rejected
[assert] a column that is not in the rows
[pass] expect: rejected, got: rejected
[assert] an update that is neither 'auto, 'nothing nor a list
[pass] expect: rejected, got: rejected
[assert] nothing left to update
[pass] expect: rejected, got: rejected
[assert] MySQL has no RETURNING
[pass] expect: rejected, got: rejected
[test] multi-row INSERT refuses rows that do not line up
[assert] a row carrying an extra column
[pass] expect: rejected, got: rejected
[assert] an empty batch
[pass] expect: rejected, got: rejected
[assert] a row with different columns
[pass] expect: rejected, got: rejected
[test] DELETE conditions
[assert] a null test binds nothing
[pass] expect: (7), got: (7)
[test] sql-parameterize fills a hand-written template
[assert] a template with no values is left alone
[pass] expect: SELECT 1, got: SELECT 1
[assert] question marks in order
[pass] expect: (SELECT * FROM t WHERE a = ? AND b = ? (1 2)), got: (SELECT * FROM t WHERE a = ? AND b = ? (1 2))
[assert] renumbered for PostgreSQL
[pass] expect: UPDATE t SET a = $1 WHERE b = $2, got: UPDATE t SET a = $1 WHERE b = $2
[test] IN and NOT IN
[assert] an empty IN never matches
[pass] expect: SELECT * FROM "users" WHERE 1 = 0, got: SELECT * FROM "users" WHERE 1 = 0
[assert] a populated NOT IN binds each element
[pass] expect: (SELECT * FROM "users" WHERE "id" NOT IN (?, ?, ?) (1 2 3)), got: (SELECT * FROM "users" WHERE "id" NOT IN (?, ?, ?) (1 2 3))
[assert] an empty NOT IN always matches
[pass] expect: SELECT * FROM "users" WHERE 1 = 1, got: SELECT * FROM "users" WHERE 1 = 1
[test] identifier quoting is what keeps a value out of the SQL
[assert] #:quote-identifiers? #f emits bare names
[pass] expect: SELECT id FROM users WHERE first_name = ?, got: SELECT id FROM users WHERE first_name = ?
[assert] and never appears in the statement
[pass] expect: #f, got: #f
[assert] a quote in a column name is doubled, not closed
[pass] expect: SELECT * FROM "t" WHERE "x""; DROP TABLE t" = ?, got: SELECT * FROM "t" WHERE "x""; DROP TABLE t" = ?
[test] misuse is reported, not silently mis-compiled
[assert] too few values
[pass] expect: rejected, got: rejected
[assert] a condition that is not a pair or list
[pass] expect: rejected, got: rejected
[assert] an unknown ORDER BY direction
[pass] expect: rejected, got: rejected
[assert] an INSERT with no columns
[pass] expect: rejected, got: rejected
[assert] an unknown placeholder style
[pass] expect: rejected, got: rejected
[assert] an operator outside the allow-list
[pass] expect: rejected, got: rejected
[assert] too many values
[pass] expect: rejected, got: rejected
[test] UPDATE binds the SET values before the WHERE ones
[assert] parameters
[pass] expect: (A 9 7), got: (A 9 7)
[assert] no conditions means no WHERE clause
[pass] expect: UPDATE "users" SET "active" = ?, got: UPDATE "users" SET "active" = ?
[test] upsert: ON DUPLICATE KEY UPDATE for MySQL
[assert] MySQL quotes its identifiers and sources VALUES()
[pass] expect: INSERT INTO `users` (`id`, `name`) VALUES (?, ?) ON DUPLICATE KEY UPDATE `id` = VALUES(`id`), `name` = VALUES(`name`), got: INSERT INTO `users` (`id`, `name`) VALUES (?, ?) ON DUPLICATE KEY UPDATE `id` = VALUES(`id`), `name` = VALUES(`name`)
[assert] an explicit column list keeps the key out of it
[pass] expect: INSERT INTO `users` (`id`, `name`, `age`) VALUES (?, ?, ?) ON DUPLICATE KEY UPDATE `name` = VALUES(`name`), got: INSERT INTO `users` (`id`, `name`, `age`) VALUES (?, ?, ?) ON DUPLICATE KEY UPDATE `name` = VALUES(`name`)
[test] upsert: multi-row batches
[assert] parameters run row by row
[pass] expect: (1 A 2 B), got: (1 A 2 B)
[test] WHERE fragments compose
[assert] with its parameters
[pass] expect: (1 2), got: (1 2)
[assert] #:start-index continues another fragment
[pass] expect: WHERE "a" = $4, got: WHERE "a" = $4
[assert] an empty condition list yields no clause
[pass] expect: , got:
[test] placeholder dialects
[assert] percent (pyformat)
[pass] expect: INSERT INTO "users" ("name") VALUES (%s), got: INSERT INTO "users" ("name") VALUES (%s)
[assert] a procedure supplies a custom style
[pass] expect: SELECT :p1, got: SELECT :p1
[test] upsert: ON CONFLICT for PostgreSQL and SQLite
[assert] sqlite renders the same ON CONFLICT form
[pass] expect: INSERT INTO "users" ("id", "name") VALUES (?, ?) ON CONFLICT ("id") DO UPDATE SET "name" = EXCLUDED."name", got: INSERT INTO "users" ("id", "name") VALUES (?, ?) ON CONFLICT ("id") DO UPDATE SET "name" = EXCLUDED."name"
[assert] an explicit column list narrows the update
[pass] expect: INSERT INTO "users" ("id", "name", "age") VALUES (?, ?, ?) ON CONFLICT ("id") DO UPDATE SET "name" = EXCLUDED."name", got: INSERT INTO "users" ("id", "name", "age") VALUES (?, ?, ?) ON CONFLICT ("id") DO UPDATE SET "name" = EXCLUDED."name"
[assert] the upsert binds no parameter of its own
[pass] expect: (1 A 2), got: (1 A 2)
[assert] and may omit it
[pass] expect: INSERT INTO "users" ("id", "name") VALUES (?, ?) ON CONFLICT DO NOTHING, got: INSERT INTO "users" ("id", "name") VALUES (?, ?) ON CONFLICT DO NOTHING
[assert] DO NOTHING keeps the conflict target
[pass] expect: INSERT INTO "users" ("id", "name") VALUES (?, ?) ON CONFLICT ("id") DO NOTHING, got: INSERT INTO "users" ("id", "name") VALUES (?, ?) ON CONFLICT ("id") DO NOTHING
[test] INSERT binds every value
[assert] parameters follow row order
[pass] expect: (O'Brien 30), got: (O'Brien 30)
[test] a query hands itself to the driver
[assert] sql-query->alist exposes the sql and the params
[pass] expect: (SELECT * FROM "t" WHERE "id" = ? (1)), got: (SELECT * FROM "t" WHERE "id" = ? (1))
[test] multi-row INSERT
[assert] rows are put into the first row's column order
[pass] expect: (A 1 B 2), got: (A 1 B 2)
[assert] parameters run row by row
[pass] expect: (A 1 B 2), got: (A 1 B 2)
[assert] numbered placeholders keep counting across rows
[pass] expect: INSERT INTO "users" ("name", "age") VALUES ($1, $2), ($3, $4), got: INSERT INTO "users" ("name", "age") VALUES ($1, $2), ($3, $4)
[assert] one row is a legal batch
[pass] expect: INSERT INTO "users" ("name") VALUES (?), got: INSERT INTO "users" ("name") VALUES (?)
------------------------------------------
[suite] Prelude test suite
[test] empty-string? tests
[assert] empty-string? with non-empty string
[pass] expect: #f, got: #f
[assert] empty-string? with whitespace
[pass] expect: #f, got: #f
[assert] empty-string? with empty string
[pass] expect: #t, got: #t
[test] non-empty-string? tests
[assert] non-empty-string? with a number
[pass] expect: #f, got: #f
[assert] non-empty-string? with whitespace
[pass] expect: #t, got: #t
[assert] non-empty-string? with empty string
[pass] expect: #f, got: #f
[assert] non-empty-string? with #f
[pass] expect: #f, got: #f
[assert] non-empty-string? with #t (not a string)
[pass] expect: #f, got: #f
[assert] non-empty-string? with non-empty string
[pass] expect: #t, got: #t
[test] assoc-lens tests
[assert] nested lookup
[pass] expect: 1, got: 1
[assert] missing nested key
[pass] expect: #f, got: #f
[assert] intermediate value is not an alist
[pass] expect: #f, got: #f
[test] alist-set tests
[assert] the original alist is never mutated
[pass] expect: ((a . 1)), got: ((a . 1))
[assert] replace an existing key in place
[pass] expect: ((a . 9) (b . 2)), got: ((a . 9) (b . 2))
[assert] add a new key at the front
[pass] expect: ((c . 3) (a . 1)), got: ((c . 3) (a . 1))
[test] assoc-ref-or-empty-str tests
[assert] key found - non-string value
[pass] expect: 2, got: 2
[assert] key found - string value
[pass] expect: hello, got: hello
[assert] key is last element
[pass] expect: value, got: value
[assert] key not found
[pass] expect: , got:
[assert] empty alist
[pass] expect: , got:
[assert] key is first element
[pass] expect: value, got: value
[test] alist-from-url-encoded-body
[assert] single key value pair
[pass] expect: ((name . John Doe)), got: ((name . John Doe))
[assert] comma character (%2C)
[pass] expect: ((list . a,b,c)), got: ((list . a,b,c))
[assert] empty key and empty value
[pass] expect: (), got: ()
[assert] single key, no equals sign
[pass] expect: ((key-only . )), got: ((key-only . ))
[assert] backslash character (%5C)
[pass] expect: ((winpath . C:\Users\)), got: ((winpath . C:\Users\))
[assert] literal equals sign stays part of the value
[pass] expect: ((q . a=b)), got: ((q . a=b))
[assert] only an ampersand
[pass] expect: (), got: ()
[assert] square brackets characters (%5B, %5D)
[pass] expect: ((array . [1,2])), got: ((array . [1,2]))
[assert] unicode characters (e.g., '?' - %C3%A9 in UTF-8)
[pass] expect: ((name . fianc?)), got: ((name . fianc?))
[assert] value with no key (unlikely but possible from split)
[pass] expect: (( . value)), got: (( . value))
[assert] parentheses characters (%28, %29)
[pass] expect: ((func . f(x))), got: ((func . f(x)))
[assert] plus sign (%2B) - often used for space, but distinct from actual '+'
[pass] expect: ((code . a+b)), got: ((code . a+b))
[assert] hash/pound sign character (%23)
[pass] expect: ((tag . #important)), got: ((tag . #important))
[assert] equals sign character (%3D)
[pass] expect: ((equation . x=y)), got: ((equation . x=y))
[assert] colon character (%3A)
[pass] expect: ((protocol . http:)), got: ((protocol . http:))
[assert] dollar sign character (%24)
[pass] expect: ((amount . $100)), got: ((amount . $100))
[assert] multiple key-value pairs
[pass] expect: ((name . Jane Doe) (age . 30)), got: ((name . Jane Doe) (age . 30))
[assert] key with no value
[pass] expect: ((key . )), got: ((key . ))
[assert] multiple keys, no equals sign
[pass] expect: ((key1 . ) (key2 . )), got: ((key1 . ) (key2 . ))
[assert] empty &-separated segments are skipped
[pass] expect: ((a . 1) (b . 2)), got: ((a . 1) (b . 2))
[assert] space character (%20)
[pass] expect: ((message . hello world)), got: ((message . hello world))
[assert] mixed valid and malformed pairs
[pass] expect: ((a . 1) (b . ) (c . 3)), got: ((a . 1) (b . ) (c . 3))
[assert] duplicate keys
[pass] expect: ((item . apple) (item . orange)), got: ((item . apple) (item . orange))
[assert] slash character (%2F)
[pass] expect: ((path . /usr/local)), got: ((path . /usr/local))
[assert] question mark character (%3F)
[pass] expect: ((query . what?)), got: ((query . what?))
[assert] multiple encoded characters in one value
[pass] expect: ((complex . a&b=c?d e)), got: ((complex . a&b=c?d e))
[assert] semicolon character (%3B)
[pass] expect: ((cookie . id;user)), got: ((cookie . id;user))
[assert] at symbol character (%40)
[pass] expect: ((email . test@example.com)), got: ((email . test@example.com))
[assert] curly braces characters (%7B, %7D)
[pass] expect: ((json . {data})), got: ((json . {data}))
[assert] empty body
[pass] expect: (), got: ()
[assert] keys and values with special characters (URL-encoded)
[pass] expect: ((param_1 . value with spaces) (param/2 . another_value!)), got: ((param_1 . value with spaces) (param/2 . another_value!))
[assert] exclamation mark character (%21)
[pass] expect: ((warning . danger!)), got: ((warning . danger!))
[assert] ampersand character (%26)
[pass] expect: ((data . one&two)), got: ((data . one&two))
[test] string-drop-first-last-n tests
[assert] n larger than length is clamped
[pass] expect: , got:
[assert] n at the boundary returns empty string
[pass] expect: , got:
[assert] n = 0 drops only the last char
[pass] expect: hell, got: hell
[assert] drop one leading and the last char
[pass] expect: ell, got: ell
[assert] short strings are returned unaltered
[pass] expect: ab, got: ab
[assert] drop two leading and the last char
[pass] expect: ll, got: ll
[assert] negative n is clamped to zero
[pass] expect: hell, got: hell
[test] string-drop tests
[assert] string-drop-first-last-line normal case
[pass] expect: middle line, got: middle line
[assert] string-drop-first-last-line empty input
[pass] expect: , got:
[assert] string-drop-first-last-line two lines
[pass] expect: , got:
[assert] string-drop-first-last-line single line
[pass] expect: , got:
[assert] string-drop-first-last single char
[pass] expect: a, got: a
[assert] string-drop-first-last two chars
[pass] expect: ab, got: ab
[assert] string-drop-first-last normal case
[pass] expect: ell, got: ell
[assert] string-drop-first-last empty string
[pass] expect: , got:
[test] assoc-ref-or tests
[assert] found key
[pass] expect: 1, got: 1
[assert] missing key defaults to #f
[pass] expect: #f, got: #f
[assert] missing key uses the given default
[pass] expect: missing, got: missing
------------------------------------------
[suite] SRFI re-exports
[test] srfi-1 list procedures
[assert] count
[pass] expect: 2, got: 2
[assert] fold
[pass] expect: 6, got: 6
[assert] reduce
[pass] expect: 6, got: 6
[assert] take and drop
[pass] expect: ((1 2) (3 4)), got: ((1 2) (3 4))
[assert] zip
[pass] expect: ((1 a) (2 b)), got: ((1 a) (2 b))
[assert] fold-right
[pass] expect: (1 2 3), got: (1 2 3)
[assert] lset-union
[pass] expect: (1 2 3), got: (1 2 3)
[assert] list-tabulate
[pass] expect: (0 1 4), got: (0 1 4)
[assert] delete-duplicates
[pass] expect: (1 2 3), got: (1 2 3)
[assert] filter-map
[pass] expect: (1 9), got: (1 9)
[test] native Guile hash tables are left untouched
[assert] core make-hash-table/hash-ref still work
[pass] expect: found, got: found
[test] srfi-19 date and time
[assert] make-date returns a date
[pass] expect: #t, got: #t
[assert] date->string returns a string
[pass] expect: #t, got: #t
[assert] current-date returns a date
[pass] expect: #t, got: #t
[test] srfi-2, 8, 11 and 26 syntactic forms
[assert] cut
[pass] expect: 3, got: 3
[assert] receive
[pass] expect: (1 2), got: (1 2)
[assert] and-let* success
[pass] expect: ok, got: ok
[assert] let-values
[pass] expect: 7, got: 7
[assert] let*-values
[pass] expect: 2, got: 2
[assert] and-let* failure
[pass] expect: #f, got: #f
[assert] cute
[pass] expect: (2 3), got: (2 3)
[test] srfi-111 boxes
[assert] set-box!
[pass] expect: 8, got: 8
[assert] box and unbox
[pass] expect: 7, got: 7
[assert] box?
[pass] expect: #t, got: #t
[test] srfi-43 vector procedures
[assert] vector-for-each
[pass] expect: 6, got: 6
[assert] vector-count
[pass] expect: 2, got: 2
[assert] vector-index
[pass] expect: 2, got: 2
[assert] vector-fold
[pass] expect: 6, got: 6
[assert] vector-map receives the index
[pass] expect: #(0 2 6), got: #(0 2 6)
[assert] vector-append
[pass] expect: #(1 2 3), got: #(1 2 3)
[test] match and pretty-print re-exports
[assert] pretty-print writes to a string
[pass] expect: #t, got: #t
[assert] match
[pass] expect: 3, got: 3
------------------------------------------
[suite] context-aware escaping
[test] unquoted attribute values
[assert] whitespace and delimiters cannot end the value
[pass] expect: a b=c/d>e, got: a b=c/d>e
[assert] a non-BMP character stays one reference
[pass] expect: 😀, got: 😀
[assert] letters, digits, - _ and . pass through
[pass] expect: abc-1_2.3, got: abc-1_2.3
[assert] quotes are encoded rather than ended
[pass] expect: "', got: "'
[test] every encoder leaves the empty string alone
[assert] empty input, empty output
[pass] expect: ( ), got: ( )
[test] CSS values
[assert] a percent sign is escaped
[pass] expect: 100\000025 , got: 100\000025
[assert] alphanumerics stay readable
[pass] expect: TimesNewRoman10px, got: TimesNewRoman10px
[assert] no function call survives
[pass] expect: #f, got: #f
[assert] a non-BMP character uses a six-digit escape
[pass] expect: \01F600 , got: \01F600
[test] JavaScript string literals
[assert] no slash survives, so </script is impossible
[pass] expect: #f, got: #f
[assert] quotes and spaces become escapes
[pass] expect: O\x27Reilly\x20\x22x\x22, got: O\x27Reilly\x20\x22x\x22
[assert] an encoded value needs no further HTML escaping
[pass] expect: it\x27s\x20\x3C\x2Fscript\x3E, got: it\x27s\x20\x3C\x2Fscript\x3E
[assert] alphanumerics stay readable
[pass] expect: abcXYZ019, got: abcXYZ019
[assert] a newline cannot break the literal
[pass] expect: a\x0Ab, got: a\x0Ab
[assert] the line separator U+2028 is escaped
[pass] expect: a\u2028b, got: a\u2028b
[assert] a non-BMP character becomes a surrogate pair
[pass] expect: \uD83D\uDE00, got: \uD83D\uDE00
[assert] BMP characters use \xHH
[pass] expect: caf\xE9, got: caf\xE9
[assert] a backslash is escaped, not left to combine
[pass] expect: a\x5Cb, got: a\x5Cb
[test] html-escape-context picks an encoder per position
[assert] css value
[pass] expect: a\000022 b, got: a\000022 b
[assert] javascript string
[pass] expect: a\x22b, got: a\x22b
[assert] unquoted attribute
[pass] expect: a b, got: a b
[assert] quoted attribute
[pass] expect: a"b, got: a"b
[assert] text is the default
[pass] expect: <b>, got: <b>
[assert] url component
[pass] expect: a%2Fb%3Fc%3Dd%26e, got: a%2Fb%3Fc%3Dd%26e
[assert] an unknown context is an error
[pass] expect: rejected, got: rejected
[assert] text
[pass] expect: <b>, got: <b>
------------------------------------------
[suite] Robustness test suite
[test] SQL literal escaping
[assert] value->sql-literal plain string
[pass] expect: 'hello', got: 'hello'
[assert] quote-sql-identifier doubles embedded quotes
[pass] expect: "we""ird", got: "we""ird"
[assert] escape-sql-string rejects NUL
[pass] expect: rejected, got: rejected
[assert] value->sql-literal escapes quotes
[pass] expect: 'O''Brien', got: 'O''Brien'
[assert] value->sql-literal boolean false
[pass] expect: 0, got: 0
[assert] pair->sql-assignment escapes quotes
[pass] expect: name = 'O''Brien', got: name = 'O''Brien'
[assert] escape-sql-string doubles quotes
[pass] expect: O''Brien, got: O''Brien
[assert] value->sql-literal boolean true
[pass] expect: 1, got: 1
[assert] value->sql-literal number
[pass] expect: 42, got: 42
[assert] quote-sql-identifier wraps a symbol
[pass] expect: "select", got: "select"
[assert] pair->sql-assignment hyphenated column
[pass] expect: first_name = 'Josep', got: first_name = 'Josep'
[assert] escape-sql-string doubles backslashes on request
[pass] expect: a\\b''c, got: a\\b''c
[assert] pair->sql-assignment keeps numbers raw
[pass] expect: age = 30, got: age = 30
[test] base64-decode known vectors
[assert] hello world
[pass] expect: hello world, got: hello world
[assert] unpadded three bytes
[pass] expect: foo, got: foo
[assert] padded two bytes
[pass] expect: fo, got: fo
[assert] empty string
[pass] expect: , got:
[assert] padded one byte
[pass] expect: f, got: f
[test] shuffle-fy does not mutate its input
[assert] the original list is unchanged
[pass] expect: (1 2 3 4 5), got: (1 2 3 4 5)
[test] shuffle-fy preserves the elements
[assert] the same seed yields the same order
[pass] expect: (10 3 9 6 13 15 8 18 19 0 4 12 7 11 2 5 14 17 16 1), got: (10 3 9 6 13 15 8 18 19 0 4 12 7 11 2 5 14 17 16 1)
[assert] single element list
[pass] expect: (1), got: (1)
[assert] a shuffled range is still the range
[pass] expect: (0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49), got: (0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49)
[assert] empty list
[pass] expect: (), got: ()
[test] base64-encode known vectors
[assert] empty string
[pass] expect: , got:
[assert] three bytes need no padding
[pass] expect: Zm9v, got: Zm9v
[assert] hello world
[pass] expect: aGVsbG8gd29ybGQ=, got: aGVsbG8gd29ybGQ=
[assert] two bytes need one padding char
[pass] expect: Zm8=, got: Zm8=
[assert] one byte needs two padding chars
[pass] expect: Zg==, got: Zg==
[assert] hello
[pass] expect: aGVsbG8=, got: aGVsbG8=
[test] html escaping covers the HTML-significant characters
[assert] ampersand is escaped
[pass] expect: a & b, got: a & b
[assert] escaping is not idempotent
[pass] expect: &amp;, got: &amp;
[assert] uppercase legacy entities are decoded
[pass] expect: &<>", got: &<>"
[assert] legacy entities are still decoded
[pass] expect: a/b*c$%, got: a/b*c$%
[assert] numeric character references are decoded
[pass] expect: '&, got: '&
[assert] slashes, stars, dollars and percent are left alone
[pass] expect: a/b*c$%, got: a/b*c$%
[assert] angle brackets are escaped
[pass] expect: <script>, got: <script>
[assert] malformed numeric references are untouched
[pass] expect: &#; &#x; � &#xg;, got: &#; &#x; � &#xg;
[assert] both quote styles are escaped
[pass] expect: "x" 'y', got: "x" 'y'
[assert] unknown entity left untouched
[pass] expect: &unknown;, got: &unknown;
[test] base64 round trips
[assert] whitespace in the encoded input is ignored
[pass] expect: hello, got: hello
[assert] newlines inside the payload
[pass] expect: line one
line two, got: line one
line two
[assert] embedded heredoc-looking terminator is safe
[pass] expect: x
EOFEOF
y, got: x
EOFEOF
y
[assert] ascii
[pass] expect: hello world, got: hello world
[assert] utf-8
[pass] expect: h?llo w?rld ?????, got: h?llo w?rld ?????
[test] file read/write helpers
[assert] read-file-string returns exact contents
[pass] expect: line 1
line 2
, got: line 1
line 2
[assert] write-file-string returns the character count
[pass] expect: 14, got: 14
[assert] cleanup the temporary file
[pass] success running without errors
[info] ran 6 tasks in: 0 seconds, 36523 microseconds
running unit tests from file: modules-spec.scm, entrypoint: spec
------------------------------------------
[suite] Kracht sub-modules
[test] (kracht strings) works standalone
[assert] base64-decode
[pass] expect: hello, got: hello
[assert] string-drop-first-last
[pass] expect: ell, got: ell
[assert] non-empty-string?
[pass] expect: #t, got: #t
[assert] base64-encode
[pass] expect: aGVsbG8=, got: aGVsbG8=
[test] (kracht io) works standalone
[assert] syscall returns a string
[pass] expect: #t, got: #t
[assert] get-short-commit-sha returns a string
[pass] expect: #t, got: #t
[test] (kracht lists) works standalone
[assert] flatten-list
[pass] expect: (1 2 3), got: (1 2 3)
[assert] assoc-ref-or
[pass] expect: 1, got: 1
[assert] alist?
[pass] expect: #t, got: #t
[test] the split is clean: modules do not leak each other's names
[assert] (kracht web) exports html-escape-context
[pass] expect: #t, got: #t
[assert] (kracht sql) exports value->sql-literal
[pass] expect: #t, got: #t
[assert] (kracht sql) exports sql-upsert-many
[pass] expect: #t, got: #t
[assert] (kracht prelude) re-exports sql-insert
[pass] expect: #t, got: #t
[assert] (kracht io) does not export base64-encode
[pass] expect: #f, got: #f
[assert] (kracht sql) exports sql-parameterize
[pass] expect: #t, got: #t
[assert] (kracht sql) exports sql-select
[pass] expect: #t, got: #t
[assert] (kracht prelude) re-exports sql-insert-many
[pass] expect: #t, got: #t
[assert] (kracht sql) does not export flatten-list
[pass] expect: #f, got: #f
[assert] (kracht strings) exports base64-encode
[pass] expect: #t, got: #t
[assert] (kracht sql) does not export the web encoders
[pass] expect: #f, got: #f
[assert] (kracht sql) exports quote-sql-identifier
[pass] expect: #t, got: #t
[assert] (kracht strings) does not export html-escape
[pass] expect: #f, got: #f
[test] (kracht web) works standalone
[assert] html-escape-context javascript
[pass] expect: a\x22b, got: a\x22b
[assert] html-escape
[pass] expect: ', got: '
[assert] html-escape-css-value
[pass] expect: 100\000025 , got: 100\000025
[assert] html-unescape numeric reference
[pass] expect: ', got: '
[assert] alist-from-url-encoded-body
[pass] expect: ((a . 1)), got: ((a . 1))
[assert] html-escape ampersand
[pass] expect: a & b, got: a & b
[assert] html-unescape
[pass] expect: <, got: <
[test] (kracht sql) works standalone
[assert] sql-upsert renders ON CONFLICT
[pass] expect: INSERT INTO "t" ("id", "a") VALUES (?, ?) ON CONFLICT ("id") DO UPDATE SET "a" = EXCLUDED."a", got: INSERT INTO "t" ("id", "a") VALUES (?, ?) ON CONFLICT ("id") DO UPDATE SET "a" = EXCLUDED."a"
[assert] sql-column->symbol
[pass] expect: first-name, got: first-name
[assert] value->sql-literal escapes quotes
[pass] expect: 'O''Brien', got: 'O''Brien'
[assert] quote-sql-identifier
[pass] expect: "select", got: "select"
[assert] symbol->sql-column
[pass] expect: first_name, got: first_name
[assert] sql-select binds its value
[pass] expect: (SELECT * FROM "t" WHERE "id" = ? (1)), got: (SELECT * FROM "t" WHERE "id" = ? (1))
[assert] sql-insert-many groups one VALUES per row
[pass] expect: INSERT INTO "t" ("a") VALUES (?), (?), got: INSERT INTO "t" ("a") VALUES (?), (?)
[info] ran 1 tasks in: 0 seconds, 8934 microseconds
finished running tests
;;; note: source file ./test/veritas/unit/prelude-spec.scm
;;; newer than compiled /root/.cache/guile/ccache/3.0-LE-8-4.7/etc/byggsteg/job-clone/kracht/trunk/test/veritas/unit/prelude-spec.scm.go
;;; note: auto-compilation is enabled, set GUILE_AUTO_COMPILE=0
;;; or pass the --no-auto-compile argument to disable.
;;; compiling ./test/veritas/unit/prelude-spec.scm
;;; note: source file ./src/kracht/prelude.scm
;;; newer than compiled /gnu/store/10jb7l516f6j7swgqshkg5fdc997zs3a-profile/lib/guile/3.0/site-ccache/kracht/prelude.go
;;; note: source file ./src/kracht/prelude.scm
;;; newer than compiled /root/.cache/guile/ccache/3.0-LE-8-4.7/etc/byggsteg/job-clone/kracht/trunk/src/kracht/prelude.scm.go
;;; compiling ./src/kracht/prelude.scm
;;; note: source file ./src/kracht/sql.scm
;;; newer than compiled /root/.cache/guile/ccache/3.0-LE-8-4.7/etc/byggsteg/job-clone/kracht/trunk/src/kracht/sql.scm.go
;;; compiling ./src/kracht/sql.scm
;;; compiled /root/.cache/guile/ccache/3.0-LE-8-4.7/etc/byggsteg/job-clone/kracht/trunk/src/kracht/sql.scm.go
;;; compiled /root/.cache/guile/ccache/3.0-LE-8-4.7/etc/byggsteg/job-clone/kracht/trunk/src/kracht/prelude.scm.go
;;; compiled /root/.cache/guile/ccache/3.0-LE-8-4.7/etc/byggsteg/job-clone/kracht/trunk/test/veritas/unit/prelude-spec.scm.go
;;; note: source file ./test/veritas/unit/modules-spec.scm
;;; newer than compiled /root/.cache/guile/ccache/3.0-LE-8-4.7/etc/byggsteg/job-clone/kracht/trunk/test/veritas/unit/modules-spec.scm.go
;;; compiling ./test/veritas/unit/modules-spec.scm
;;; compiled /root/.cache/guile/ccache/3.0-LE-8-4.7/etc/byggsteg/job-clone/kracht/trunk/test/veritas/unit/modules-spec.scm.go
--------------------------------------------------------------
Maak: the infinitely extensible command runner
Loading tasks from Maak file: /etc/byggsteg/job-clone/kracht/trunk/maak.scm
Executing Maak tasks: test
--------------------------------------------------------------
=> Running Maak task: test
Run project's tests.