liminix/pkgs/anoia/test.fnl
Daniel Barlow 7e19d80130 anoia: add assert macro module
contains expect and expect=
2024-04-20 14:04:32 +01:00

10 lines
316 B
Fennel

(local { : hash : base64url } (require :anoia))
(import-macros { : expect= } :anoia.assert)
(expect= (hash "") 5381)
;; these examples from https://theartincode.stanis.me/008-djb2/
(expect= (hash "Hello") 210676686969)
(expect= (hash "Hello!") 6952330670010)
(expect= (base64url "hello world") "aGVsbG8gd29ybGQ")