diff options
author | Mark H Weaver <mhw@netris.org> | 2014-08-26 12:03:13 -0400 |
---|---|---|
committer | Mark H Weaver <mhw@netris.org> | 2014-08-26 12:03:13 -0400 |
commit | 5cc4517590d4d517bf9e29db5d9c5e03e4e0ad26 (patch) | |
tree | ec8a7c9d7e449e192258b167d727e03f36a2b851 /tests | |
parent | bc0506f5b75812431e8530e213ca642028743f9e (diff) | |
parent | c2815c0f46d16b98559d0498ae683b0e36e25e7a (diff) | |
download | patches-5cc4517590d4d517bf9e29db5d9c5e03e4e0ad26.tar patches-5cc4517590d4d517bf9e29db5d9c5e03e4e0ad26.tar.gz |
Merge branch 'master' into core-updates
Diffstat (limited to 'tests')
-rw-r--r-- | tests/guix-register.sh | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/tests/guix-register.sh b/tests/guix-register.sh index 3f261d7bef..e99f5c6075 100644 --- a/tests/guix-register.sh +++ b/tests/guix-register.sh @@ -43,13 +43,28 @@ $new_file 0 EOF -# Make sure it's valid, and delete it. +# Register an idendical file, and make sure it gets deduplicated. +new_file2="$new_file-duplicate" +cat "$new_file" > "$new_file2" +guix-register <<EOF +$new_file2 + +0 +EOF + +guile -c " + (exit (= (stat:ino (stat \"$new_file\")) + (stat:ino (stat \"$new_file2\"))))" + +# Make sure both are valid, and delete them. guile -c " (use-modules (guix store)) (define s (open-connection)) (exit (and (valid-path? s \"$new_file\") + (valid-path? s \"$new_file2\") (null? (references s \"$new_file\")) - (pair? (delete-paths s (list \"$new_file\")))))" + (null? (references s \"$new_file2\")) + (pair? (delete-paths s (list \"$new_file\" \"$new_file2\")))))" # |