From ded10e28782f289ad3db15320bcf619ab4336876 Mon Sep 17 00:00:00 2001 From: Vivien Kraus Date: Mon, 9 Aug 2021 18:46:48 +0200 Subject: Switch to a more sensible error reporting system --- tests/too-many-refresh-tokens.scm | 34 ++++++++++++++++++---------------- 1 file changed, 18 insertions(+), 16 deletions(-) (limited to 'tests/too-many-refresh-tokens.scm') diff --git a/tests/too-many-refresh-tokens.scm b/tests/too-many-refresh-tokens.scm index 3926da4..aacfbbd 100644 --- a/tests/too-many-refresh-tokens.scm +++ b/tests/too-many-refresh-tokens.scm @@ -1,4 +1,4 @@ -;; webid-oidc, implementation of the Solid specification +;; disfluid, implementation of the Solid specification ;; Copyright (C) 2020, 2021 Vivien Kraus ;; This program is free software: you can redistribute it and/or modify @@ -44,23 +44,25 @@ (second-refresh-token (vector-ref refresh-tokens 20))) (with-exception-handler (lambda (error) - (unless ((record-predicate &invalid-refresh-token) error) + (unless (invalid-refresh-token? error) (exit 1))) (lambda () - (with-refresh-token first-refresh-token key - (lambda (sub aud) - ;; It has been made invalid! - (exit 1)))) + (with-refresh-token + first-refresh-token key + (lambda (sub aud) + ;; It has been made invalid! + (exit 1)))) #:unwind? #t #:unwind-for-type &invalid-refresh-token) - (unless (with-refresh-token second-refresh-token key - (lambda (sub aud) - (format (current-error-port) - "~a / ~a\n" - (uri->string sub) - (uri->string aud)) - (unless (equal? sub (string->uri "https://subject-2.com")) - (exit 2)) - (unless (equal? aud (string->uri "https://client-2.com")) - (exit 3)))) + (unless (with-refresh-token + second-refresh-token key + (lambda (sub aud) + (format (current-error-port) + "~a / ~a\n" + (uri->string sub) + (uri->string aud)) + (unless (equal? sub (string->uri "https://subject-2.com")) + (exit 2)) + (unless (equal? aud (string->uri "https://client-2.com")) + (exit 3)))) (exit 4)))))) -- cgit v1.2.3