aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorHugo Hörnquist <hugo@lysator.liu.se>2023-02-21 03:21:43 +0100
committerHugo Hörnquist <hugo@lysator.liu.se>2023-09-11 19:58:54 +0200
commitc26324e29043423387c3041e86d8cbe5cd4102b2 (patch)
tree6395e01b19572bbc22487115e52cadd1f39fafcf /tests
parentFix seeding of UUIDs. (diff)
downloadcalp-c26324e29043423387c3041e86d8cbe5cd4102b2.tar.gz
calp-c26324e29043423387c3041e86d8cbe5cd4102b2.tar.xz
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.
Diffstat (limited to 'tests')
-rw-r--r--tests/test/util.scm5
-rwxr-xr-xtests/validate-html/run-validator.scm2
2 files changed, 3 insertions, 4 deletions
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)))))