changeset 35471:ea4d27aac557

tests: fix a bug in `f` that prevented calculating sha1sum on a file
author Matt Harbison <matt_harbison@yahoo.com>
date Wed, 20 Dec 2017 20:41:12 -0500
parents a33be093ec62
children c1f7037c2ded
files tests/f tests/test-tools.t
diffstat 2 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/tests/f	Thu Dec 21 22:17:39 2017 +0900
+++ b/tests/f	Wed Dec 20 20:41:12 2017 -0500
@@ -59,7 +59,7 @@
         if isfile:
             if opts.type:
                 facts.append('file')
-            if opts.hexdump or opts.dump or opts.md5:
+            if opts.hexdump or opts.dump or opts.md5 or opts.sha1:
                 content = open(f, 'rb').read()
         elif islink:
             if opts.type:
--- a/tests/test-tools.t	Thu Dec 21 22:17:39 2017 +0900
+++ b/tests/test-tools.t	Wed Dec 20 20:41:12 2017 -0500
@@ -38,6 +38,9 @@
   $ f foo
   foo:
 
+  $ f --sha1 foo
+  foo: sha1=f1d2d2f924e986ac86fdf7b36c94bcdf32beec15
+
 #if symlink
   $ f foo --mode
   foo: mode=644