Mercurial > hg-stable
changeset 23911:593a5cd709a2
tests: teach f not to report directory size
It's not meaningful or portable
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Sat, 17 Jan 2015 13:53:16 -0800 |
parents | 759df5197e9a |
children | 7d0aa6269ece |
files | tests/f tests/test-tools.t |
diffstat | 2 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/tests/f Sat Jan 17 13:44:43 2015 -0800 +++ b/tests/f Sat Jan 17 13:53:16 2015 -0800 @@ -61,7 +61,7 @@ facts.append('type unknown') if not isstdin: stat = os.lstat(f) - if opts.size: + if opts.size and not isdir: facts.append('size=%s' % stat.st_size) if opts.mode: facts.append('mode=%o' % (stat.st_mode & 0777))
--- a/tests/test-tools.t Sat Jan 17 13:44:43 2015 -0800 +++ b/tests/test-tools.t Sat Jan 17 13:53:16 2015 -0800 @@ -65,7 +65,7 @@ #if unix-permissions symlink $ ln -s yadda l $ f . --recurse -MStmsB4 - .: directory with 4 files, size=*, mode=755 (glob) + .: directory with 4 files, mode=755 ./bar: file, size=21, mode=755, md5=3b03, sha1=612c ./baz: file, size=21, mode=755, md5=3b03, sha1=612c ./foo: file, size=4, mode=644, md5=d3b0, sha1=f1d2