aboutsummaryrefslogtreecommitdiff
path: root/tests/guix-system.sh
diff options
context:
space:
mode:
Diffstat (limited to 'tests/guix-system.sh')
-rw-r--r--tests/guix-system.sh14
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/guix-system.sh b/tests/guix-system.sh
index 667e084fcf..957479ede0 100644
--- a/tests/guix-system.sh
+++ b/tests/guix-system.sh
@@ -297,6 +297,20 @@ EOF
guix system build "$tmpdir/config.scm" -n
(cd "$tmpdir"; guix system build "config.scm" -n)
+# Check that we get a warning when passing 'local-file' a non-literal relative
+# file name.
+cat > "$tmpdir/config.scm" <<EOF
+(use-modules (guix))
+
+(define (bad-local-file file)
+ (local-file file))
+
+(bad-local-file "whatever.scm")
+EOF
+! guix system build "$tmpdir/config.scm" -n
+guix system build "$tmpdir/config.scm" -n 2>&1 | \
+ grep "config\.scm:4:2: warning:.*whatever.*relative to current directory"
+
# Searching.
guix system search tor | grep "^name: tor"
guix system search tor | grep "^shepherdnames: tor"