From c26324e29043423387c3041e86d8cbe5cd4102b2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hugo=20H=C3=B6rnquist?= Date: Tue, 21 Feb 2023 03:21:43 +0100 Subject: Change `kvlist->assq` and `group-by` to return pairs. Each value in the return of group-by must have exactly two values, so cons pairs (instead of lists) is much better. --- tests/test/util.scm | 5 ++--- tests/validate-html/run-validator.scm | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) (limited to 'tests') diff --git a/tests/test/util.scm b/tests/test/util.scm index 75d59801..d2fc2d81 100644 --- a/tests/test/util.scm +++ b/tests/test/util.scm @@ -127,7 +127,6 @@ (test-group "Arrows" - (test-equal "->" 9 (-> 1 (+ 2) (* 3))) (test-equal "-> order dependant" -1 (-> 1 (- 2))) (test-equal "->> order dependant" 1 (->> 1 (- 2)))) @@ -154,12 +153,12 @@ (assq-merge '((k 1) (v 2)) '((k 2)))) (test-equal "kvlist->assq" - '((a 1) (b 2)) + '((a . 1) (b . 2)) (kvlist->assq '(a: 1 b: 2))) (test-equal "kvlist->assq repeated key" - '((a 1) (b 2) (a 3)) + '((a . 1) (b . 2) (a . 3)) (kvlist->assq '(a: 1 b: 2 a: 3)))) (test-equal "vector-last" diff --git a/tests/validate-html/run-validator.scm b/tests/validate-html/run-validator.scm index bd96c32d..0c4ee0bc 100755 --- a/tests/validate-html/run-validator.scm +++ b/tests/validate-html/run-validator.scm @@ -80,6 +80,6 @@ exec $GUILE -e main -s "$0" -- "$@" (begin (for-each (lambda (group) (format #t "~a~%" (-> group car (assoc-ref 'url) car)) - (for-each display-entry (cadr group))) + (for-each display-entry (cdr group))) (group-by-file filtered-data)) (exit 1))))) -- cgit v1.2.3