summary refs log tree commit diff
path: root/tests
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2015-06-24 15:00:34 +0200
committerLudovic Courtès <ludo@gnu.org>2015-06-24 18:05:03 +0200
commit8de3df72bc96cc3f7739e61699831557852cea6b (patch)
tree54f5b186e73c69d7edef9e75becc4fe7c696bc41 /tests
parent31fbf4b6377d9a1c44eb3230b89f0bac47a202b4 (diff)
downloadguix-8de3df72bc96cc3f7739e61699831557852cea6b.tar.gz
tests: Move 'file=?' to (guix tests).
* tests/nar.scm (file-tree-equal?)[file=?]: Move to...
* guix/tests.scm (file=?): ... here.  New procedure.
Diffstat (limited to 'tests')
-rw-r--r--tests/nar.scm11
1 files changed, 0 insertions, 11 deletions
diff --git a/tests/nar.scm b/tests/nar.scm
index 4ccd364861..b8e50c7603 100644
--- a/tests/nar.scm
+++ b/tests/nar.scm
@@ -108,17 +108,6 @@
     (cute string-drop <> (string-length input)))
   (define sibling
     (compose (cut string-append output <>) strip))
-  (define (file=? a b)
-    (and (eq? (stat:type (lstat a)) (stat:type (lstat b)))
-         (case (stat:type (lstat a))
-           ((regular)
-            (equal?
-             (call-with-input-file a get-bytevector-all)
-             (call-with-input-file b get-bytevector-all)))
-           ((symlink)
-            (string=? (readlink a) (readlink b)))
-           (else
-            (error "what?" (lstat a))))))
 
   (file-system-fold (const #t)
                     (lambda (name stat result)    ; leaf