summaryrefslogtreecommitdiff
path: root/tests/base64-error.scm
blob: 096e1e8036bb7d94015c2b52d4a4f9fae7cac3c8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
(use-modules
 (webid-oidc testing)
 ((webid-oidc stubs) #:prefix stubs:)
 (webid-oidc errors)
 (rnrs bytevectors))

(with-test-environment
 "base64-error"
 (lambda ()
   (let ((test "hello :)"))
     (unless
         (with-exception-handler
             (lambda (error)
               (unless ((record-predicate &not-base64) error)
                 (exit 1))
               #t)
           (lambda ()
             (stubs:base64-decode test)
             #f)
           #:unwind? #t
           #:unwind-for-type &not-base64)
       (exit 2)))))