liminix

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

test.fnl (309B)


      1 (local { : hash : base64url } (require :init))
      2 (import-macros { : expect= } :assert)
      3 
      4 (expect= (hash "") 5381)
      5 
      6 ;; these examples from https://theartincode.stanis.me/008-djb2/
      7 (expect= (hash "Hello") 210676686969)
      8 (expect= (hash "Hello!") 6952330670010)
      9 
     10 (expect= (base64url "hello world") "aGVsbG8gd29ybGQ")