aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorMark H Weaver <mhw@netris.org>2019-08-29 17:19:18 -0400
committerMark H Weaver <mhw@netris.org>2019-08-29 17:19:18 -0400
commit0481289cbccba2646bf654f0ae49ac9c45602d5d (patch)
treecbe1351e2751e9d22c4c8add02991a3e6674f26a /tests
parentc55fae452032aa4b1b63406983e9abdf70adc957 (diff)
parent9fbf4d2a52d4d3e01059f3432bb3f78182b5a822 (diff)
downloadguix-0481289cbccba2646bf654f0ae49ac9c45602d5d.tar
guix-0481289cbccba2646bf654f0ae49ac9c45602d5d.tar.gz
Merge branch 'master' into core-updates
Diffstat (limited to 'tests')
-rw-r--r--tests/accounts.scm19
-rw-r--r--tests/guix-pack-relocatable.sh6
-rw-r--r--tests/pack.scm1
3 files changed, 26 insertions, 0 deletions
diff --git a/tests/accounts.scm b/tests/accounts.scm
index 673dd42432..78136390bb 100644
--- a/tests/accounts.scm
+++ b/tests/accounts.scm
@@ -62,6 +62,25 @@ nobody:!:0::::::\n"))
(shell "/bin/sh")))
port))))
+(test-equal "write-passwd with duplicate entry"
+ %passwd-sample
+ (call-with-output-string
+ (lambda (port)
+ (let ((charlie (password-entry
+ (name "charlie")
+ (uid 1000) (gid 998)
+ (real-name "Charlie")
+ (directory "/home/charlie")
+ (shell "/bin/sh"))))
+ (write-passwd (list (password-entry
+ (name "root")
+ (uid 0) (gid 0)
+ (real-name "Admin")
+ (directory "/root")
+ (shell "/bin/sh"))
+ charlie charlie)
+ port)))))
+
(test-equal "read-passwd + write-passwd"
%passwd-sample
(call-with-output-string
diff --git a/tests/guix-pack-relocatable.sh b/tests/guix-pack-relocatable.sh
index ebada62c01..e93610eedc 100644
--- a/tests/guix-pack-relocatable.sh
+++ b/tests/guix-pack-relocatable.sh
@@ -78,3 +78,9 @@ else
"$test_directory/Bin/sed" --version > "$test_directory/output"
fi
grep 'GNU sed' "$test_directory/output"
+chmod -Rf +w "$test_directory"; rm -rf "$test_directory"/*
+
+# Ensure '-R' works with outputs other than "out".
+tarball="`guix pack -R -S /share=share groff:doc`"
+(cd "$test_directory"; tar xvf "$tarball")
+test -d "$test_directory/share/doc/groff/html"
diff --git a/tests/pack.scm b/tests/pack.scm
index ea88cd89f2..71ff5aec18 100644
--- a/tests/pack.scm
+++ b/tests/pack.scm
@@ -169,6 +169,7 @@
(when
(and (file-exists? (string-append bin "/guile"))
(file-exists? "var/guix/db/db.sqlite")
+ (file-is-directory? "tmp")
(string=? (string-append #$%bootstrap-guile "/bin")
(pk 'binlink (readlink bin)))
(string=? (string-append #$profile "/bin/guile")