aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorKonrad Hinsen <konrad.hinsen@fastmail.net>2020-09-11 13:13:26 +0200
committerLudovic Courtès <ludo@gnu.org>2020-09-16 16:04:01 +0200
commitd7f7ed39be3be926b3c46c0ea15d416c593ef61f (patch)
treeac8e59c5e4be19c84aeaf46a98142b21fc9d518f /tests
parent7194b63833f3cbcd29a65bae0ecd6876cdb1f197 (diff)
downloadguix-d7f7ed39be3be926b3c46c0ea15d416c593ef61f.tar
guix-d7f7ed39be3be926b3c46c0ea15d416c593ef61f.tar.gz
repl: Look for script files in (getcwd).
Fixes <https://bugs.gnu.org/43331>. * guix/scripts/repl.scm (guix-repl): Replace "." by (getcwd) * tests/guix-repl.sh: Add test. Co-authored-by: Ludovic Courtès <ludo@gnu.org>
Diffstat (limited to 'tests')
-rw-r--r--tests/guix-repl.sh4
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/guix-repl.sh b/tests/guix-repl.sh
index e1c2b8241f..d4ebb5f6c6 100644
--- a/tests/guix-repl.sh
+++ b/tests/guix-repl.sh
@@ -45,6 +45,10 @@ EOF
test "`guix repl "$tmpfile"`" = "coreutils"
+# Make sure that the file can also be loaded when passed as a relative file
+# name.
+(cd "$(dirname "$tmpfile")"; test "$(guix repl "$(basename "$tmpfile")")" = "coreutils")
+
cat > "$module_dir/foo.scm"<<EOF
(define-module (foo)