me
/
guix
Archived
1
0
Fork 0

Add `add-to-store' test for flat files.

* tests/derivations.scm ("add-to-store, flat"): New test.
master
Ludovic Courtès 2012-06-12 00:19:04 +02:00
parent 3eb982377e
commit d1b1c4249a
1 changed files with 7 additions and 0 deletions

View File

@ -66,6 +66,13 @@
(test-skip (if %store 0 4)) (test-skip (if %store 0 4))
(test-assert "add-to-store, flat"
(let* ((file (search-path %load-path "language/tree-il/spec.scm"))
(drv (add-to-store %store "flat-test" #t #f "sha256" file)))
(and (eq? 'regular (stat:type (stat drv)))
(equal? (call-with-input-file file get-bytevector-all)
(call-with-input-file drv get-bytevector-all)))))
(test-assert "add-to-store, recursive" (test-assert "add-to-store, recursive"
(let* ((dir (dirname (search-path %load-path "language/tree-il/spec.scm"))) (let* ((dir (dirname (search-path %load-path "language/tree-il/spec.scm")))
(drv (add-to-store %store "dir-tree-test" #t #t "sha256" dir))) (drv (add-to-store %store "dir-tree-test" #t #t "sha256" dir)))