summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2012-05-23 13:46:25 +0200
committerLars Wirzenius <liw@liw.fi>2012-05-23 13:46:25 +0200
commit4c1035b0df886ff63b8e9c8bacf0642dd236cb86 (patch)
tree0c95a4e3736f0a26734183ba4e55c155992b8ace /tests
parentca936f7c5f387b097c544989a762a1e2e07c1e39 (diff)
downloadsummain-4c1035b0df886ff63b8e9c8bacf0642dd236cb86.tar.gz
Make summain handle a symlink to root
Diffstat (limited to 'tests')
-rwxr-xr-xtests/symlink-root.script9
-rw-r--r--tests/symlink-root.stdout7
2 files changed, 16 insertions, 0 deletions
diff --git a/tests/symlink-root.script b/tests/symlink-root.script
new file mode 100755
index 0000000..c82f5c8
--- /dev/null
+++ b/tests/symlink-root.script
@@ -0,0 +1,9 @@
+#!/bin/sh
+
+set -e
+
+mkdir "$DATADIR/dir"
+ln -s dir "$DATADIR/symlink"
+./summain --exclude=mtime --exclude=uid --exclude=username \
+ --exclude=gid --exclude=group --exclude=mode "$DATADIR/symlink" |
+sed 's,^Name: /.*/,Name: ,'
diff --git a/tests/symlink-root.stdout b/tests/symlink-root.stdout
new file mode 100644
index 0000000..8288ba8
--- /dev/null
+++ b/tests/symlink-root.stdout
@@ -0,0 +1,7 @@
+Name: symlink
+Ino: 1
+Dev: 1
+Nlink: 1
+Size: 3
+Target: dir
+