summaryrefslogtreecommitdiff
path: root/tests/build-utils.scm
diff options
context:
space:
mode:
authorCarlo Zancanaro <carlo@zancanaro.id.au>2023-05-20 23:05:06 +1000
committerLudovic Courtès <ludo@gnu.org>2024-08-31 10:42:06 +0200
commit994fbc0ac6c6efcb385cbd6ef7b9073b7571ac93 (patch)
treebbae2d6109db83dace0ae536057da8748c5168c1 /tests/build-utils.scm
parent6da03fcc459f4475553f394354ef37c628f39f97 (diff)
build: utils: Raise error in modify-phases upon missing key.
* guix/build/utils.scm (alist-cons-before) (alist-cons-after): Error with a match failure if the reference is not found, instead of appending to the alist. * tests/build-utils.scm: Update tests to match the new behavior. Signed-off-by: Maxim Cournoyer <maxim.cournoyer@gmail.com> Change-Id: I3044b101bd06231d5cd55a544ac1009e6ce6f9a0
Diffstat (limited to 'tests/build-utils.scm')
-rw-r--r--tests/build-utils.scm12
1 files changed, 6 insertions, 6 deletions
diff --git a/tests/build-utils.scm b/tests/build-utils.scm
index 7f4f12ccc7d..3babf5d5445 100644
--- a/tests/build-utils.scm
+++ b/tests/build-utils.scm
@@ -41,17 +41,17 @@
41 '((a . 1) (x . 42) (b . 2) (c . 3)) 41 '((a . 1) (x . 42) (b . 2) (c . 3))
42 (alist-cons-before 'b 'x 42 '((a . 1) (b . 2) (c . 3)))) 42 (alist-cons-before 'b 'x 42 '((a . 1) (b . 2) (c . 3))))
43 43
44(test-equal "alist-cons-before, reference not found" 44(test-assert "alist-cons-before, reference not found"
45 '((a . 1) (b . 2) (c . 3) (x . 42)) 45 (not (false-if-exception
46 (alist-cons-before 'z 'x 42 '((a . 1) (b . 2) (c . 3)))) 46 (alist-cons-before 'z 'x 42 '((a . 1) (b . 2) (c . 3))))))
47 47
48(test-equal "alist-cons-after" 48(test-equal "alist-cons-after"
49 '((a . 1) (b . 2) (x . 42) (c . 3)) 49 '((a . 1) (b . 2) (x . 42) (c . 3))
50 (alist-cons-after 'b 'x 42 '((a . 1) (b . 2) (c . 3)))) 50 (alist-cons-after 'b 'x 42 '((a . 1) (b . 2) (c . 3))))
51 51
52(test-equal "alist-cons-after, reference not found" 52(test-assert "alist-cons-after, reference not found"
53 '((a . 1) (b . 2) (c . 3) (x . 42)) 53 (not (false-if-exception
54 (alist-cons-after 'z 'x 42 '((a . 1) (b . 2) (c . 3)))) 54 (alist-cons-after 'z 'x 42 '((a . 1) (b . 2) (c . 3))))))
55 55
56(test-equal "alist-replace" 56(test-equal "alist-replace"
57 '((a . 1) (b . 77) (c . 3)) 57 '((a . 1) (b . 77) (c . 3))