diff options
author | Vivien Kraus <vivien@planete-kraus.eu> | 2020-01-01 00:00:00 +0100 |
---|---|---|
committer | Vivien Kraus <vivien@planete-kraus.eu> | 2021-05-11 00:14:28 +0200 |
commit | fccfd5e7845fa849a9c398e8803accb36f35249d (patch) | |
tree | c02af67f4808d13ca45adfb10838126d40f37417 /tests/hash-unsupported.scm | |
parent | c1940e2d9c926374e581cef7b47082b62e76f4ca (diff) |
Add a hash function
Diffstat (limited to 'tests/hash-unsupported.scm')
-rw-r--r-- | tests/hash-unsupported.scm | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/tests/hash-unsupported.scm b/tests/hash-unsupported.scm new file mode 100644 index 0000000..c52959a --- /dev/null +++ b/tests/hash-unsupported.scm @@ -0,0 +1,21 @@ +(use-modules + (webid-oidc testing) + (webid-oidc errors) + ((webid-oidc stubs) #:prefix stubs:) + (rnrs bytevectors)) + +(with-test-environment + "hash-unsupported" + (lambda () + (with-exception-handler + (lambda (error) + (unless ((record-predicate &unsupported-alg) error) + (exit 1)) + (let ((value ((record-accessor &unsupported-alg 'value) error))) + (unless (eq? value 'SHA-1024) + (exit 2)))) + (lambda () + (stubs:hash 'SHA-1024 "hello :)") + (exit 3)) + #:unwind? #t + #:unwind-for-type &unsupported-alg))) |