summaryrefslogtreecommitdiff
path: root/tests/df/df-output.sh
diff options
context:
space:
mode:
Diffstat (limited to 'tests/df/df-output.sh')
-rwxr-xr-x[-rw-r--r--]tests/df/df-output.sh16
1 files changed, 13 insertions, 3 deletions
diff --git a/tests/df/df-output.sh b/tests/df/df-output.sh
index a10f2706..b2715885 100644..100755
--- a/tests/df/df-output.sh
+++ b/tests/df/df-output.sh
@@ -1,7 +1,7 @@
#!/bin/sh
# Exercise df's --output option.
-# Copyright (C) 2012-2013 Free Software Foundation, Inc.
+# Copyright (C) 2012-2014 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -67,11 +67,11 @@ compare exp out || fail=1
# that --o (without argument) is identical to the full list.
cat <<\EOF > exp || framework_failure_
-Filesystem Type Inodes IUsed IFree IUse% Size Used Avail Use% Mounted on
+Filesystem Type Inodes IUsed IFree IUse% Size Used Avail Use% File Mounted on
EOF
df -h --o=source,fstype,itotal,iused,iavail,ipcent \
- --o=size,used,avail,pcent,target '.' >out || fail=1
+ --o=size,used,avail,pcent,file,target '.' >out || fail=1
sed -e '1 {
s/ [ ]*/ /g
q
@@ -127,4 +127,14 @@ compare exp out2 || fail=1
df --help > out || fail=1
grep ' --output' out >/dev/null || { fail=1; cat out; }
+# Ensure that the FILE field contains the argument.
+cat <<\EOF > exp || framework_failure_
+.
+exp
+EOF
+
+df --output=file '.' exp >out || fail=1
+sed '1d' out > out2
+compare exp out2 || fail=1
+
Exit $fail