aboutsummaryrefslogtreecommitdiff
path: root/tests/store.scm
diff options
context:
space:
mode:
author宋文武 <iyzsong@gmail.com>2015-04-08 16:04:37 +0800
committer宋文武 <iyzsong@gmail.com>2015-04-08 16:04:37 +0800
commitcf3e3e374c4bd1c9f0f976fc8f02f66aff6417dc (patch)
treeb4ce7938c855781af2e0a1e68b3588f96de7e7e1 /tests/store.scm
parent4ae7559fd62c03a800b010c228639f18b9f58006 (diff)
parent068a53c36dec5ace42cc3ea89060d9a485592f08 (diff)
downloadpatches-cf3e3e374c4bd1c9f0f976fc8f02f66aff6417dc.tar
patches-cf3e3e374c4bd1c9f0f976fc8f02f66aff6417dc.tar.gz
Merge branch 'master' into core-updates
Diffstat (limited to 'tests/store.scm')
-rw-r--r--tests/store.scm10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/store.scm b/tests/store.scm
index f778c2086d..eeceed45c1 100644
--- a/tests/store.scm
+++ b/tests/store.scm
@@ -606,6 +606,16 @@
(file (add %store "foo" "Lowered.")))
(call-with-input-file file get-string-all)))
+(test-assert "query-path-info"
+ (let* ((ref (add-text-to-store %store "ref" "foo"))
+ (item (add-text-to-store %store "item" "bar" (list ref)))
+ (info (query-path-info %store item)))
+ (and (equal? (path-info-references info) (list ref))
+ (equal? (path-info-hash info)
+ (sha256
+ (string->utf8
+ (call-with-output-string (cut write-file item <>))))))))
+
(test-end "store")