aboutsummaryrefslogtreecommitdiff
path: root/tests/modules.scm
diff options
context:
space:
mode:
Diffstat (limited to 'tests/modules.scm')
-rw-r--r--tests/modules.scm10
1 files changed, 9 insertions, 1 deletions
diff --git a/tests/modules.scm b/tests/modules.scm
index e70d2d9e08..bb2c70e287 100644
--- a/tests/modules.scm
+++ b/tests/modules.scm
@@ -1,5 +1,5 @@
;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2016, 2017 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2016-2017, 2024 Ludovic Courtès <ludo@gnu.org>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -65,4 +65,12 @@
(source-module-closure '((baz)) (list directory)
#:select? (const #t))))))
+(test-equal "file-name->module-name"
+ '(guix foo)
+ (file-name->module-name "guix/foo.scm"))
+
+(test-equal "file-name->module-name, leading dot"
+ '(guix foo)
+ (file-name->module-name "./guix/foo.scm"))
+
(test-end)