aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFelix Janda <felix.janda@posteo.de>2014-09-22 08:22:12 -0500
committerFelix Janda <felix.janda@posteo.de>2014-09-22 08:22:12 -0500
commit986805cfe85c7e817d8ee5b1d3cc7a8a231359da (patch)
tree6e7238b5301a36e267dffedac2293b427d510e48
parent29d30be31123129deac142c6208faa7a1a98b2d0 (diff)
downloadtoybox-986805cfe85c7e817d8ee5b1d3cc7a8a231359da.tar.gz
Fix du test: du symlink -> "0\tsymlink"
-rwxr-xr-xtests/du.test10
1 files changed, 6 insertions, 4 deletions
diff --git a/tests/du.test b/tests/du.test
index ee4867b8..fabb800b 100755
--- a/tests/du.test
+++ b/tests/du.test
@@ -13,13 +13,15 @@ testing "du (no options)" "du -k du_test" "4\tdu_test/test\n8\tdu_test\n" "" ""
testing "du -s" "du -k -s du_test" "8\tdu_test\n" "" ""
ln -s ../du_2 du_test/xyz
# "du shall count the size of the symbolic link"
-# I assume this means the space used to store the link name
-testing "du counts symlinks without following" "du -ks du_test" "12\tdu_test\n" "" ""
+# The tests assume that like for most POSIX systems symbolic
+# links are stored directly in the inode so that the
+# allocated file space is zero.
+testing "du counts symlinks without following" "du -ks du_test" "8\tdu_test\n" "" ""
testing "du -L follows symlinks" "du -ksL du_test" "16\tdu_test\n" "" ""
# if -H and -L are specified, the last takes priority
testing "du -HL follows symlinks" "du -ksHL du_test" "16\tdu_test\n" "" ""
-testing "du -H does not follow unspecified symlinks" "du -ksH du_test" "12\tdu_test\n" "" ""
-testing "du -LH does not follow unspecified symlinks" "du -ksLH du_test" "12\tdu_test\n" "" ""
+testing "du -H does not follow unspecified symlinks" "du -ksH du_test" "8\tdu_test\n" "" ""
+testing "du -LH does not follow unspecified symlinks" "du -ksLH du_test" "8\tdu_test\n" "" ""
testing "du -H follows specified symlinks" "du -ksH du_test/xyz" "8\tdu_test/xyz\n" "" ""
rm -rf du_test du_2