summaryrefslogtreecommitdiff
path: root/tests/gexp.scm
diff options
context:
space:
mode:
authorMarius Bakke <mbakke@fastmail.com>2018-11-05 23:56:22 +0100
committerMarius Bakke <mbakke@fastmail.com>2018-11-05 23:56:22 +0100
commitf4a5faa9dcadc698383e15743ac5f974ee0e3c8b (patch)
tree96124567d5604c496cf8d2848ffe348de0b701ac /tests/gexp.scm
parent16b89ecc1f2f1f9651d119518c0e752b01f0f07b (diff)
parentadde15186da7529b85097fdafffc2a13b0e60bdf (diff)
downloadpatches-f4a5faa9dcadc698383e15743ac5f974ee0e3c8b.tar
patches-f4a5faa9dcadc698383e15743ac5f974ee0e3c8b.tar.gz
Merge branch 'master' into core-updates
Diffstat (limited to 'tests/gexp.scm')
-rw-r--r--tests/gexp.scm16
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/gexp.scm b/tests/gexp.scm
index bc83a8de8c..d5bc5dbc71 100644
--- a/tests/gexp.scm
+++ b/tests/gexp.scm
@@ -680,6 +680,22 @@
#~(foo #$@(list (with-imported-modules '((foo)) #~+)
(with-imported-modules '((bar)) #~-)))))
+(test-assert "gexp-modules deletes duplicates" ;<https://bugs.gnu.org/32966>
+ (let ((make-file (lambda ()
+ ;; Use 'eval' to make sure we get an object that's not
+ ;; 'eq?' nor 'equal?' due to the closures it embeds.
+ (eval '(scheme-file "bar.scm" #~(define-module (bar)))
+ (current-module)))))
+ (define result
+ ((@@ (guix gexp) gexp-modules)
+ (with-imported-modules `(((bar) => ,(make-file))
+ ((bar) => ,(make-file))
+ (foo) (foo))
+ #~+)))
+
+ (match result
+ (((('bar) '=> (? scheme-file?)) ('foo)) #t))))
+
(test-equal "gexp-modules and literal Scheme object"
'()
(gexp-modules #t))