doc: stat: clarify that %t and %T expand to the file system type
[coreutils/ericb.git] / tests / misc / wc-files0
blob0cc4b84174482dc38f38f639dd097c3a661960ab
1 #!/bin/sh
2 # Show that wc's new --files0-from option works.
4 # Copyright (C) 2006-2011 Free Software Foundation, Inc.
6 # This program is free software: you can redistribute it and/or modify
7 # it under the terms of the GNU General Public License as published by
8 # the Free Software Foundation, either version 3 of the License, or
9 # (at your option) any later version.
11 # This program is distributed in the hope that it will be useful,
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 # GNU General Public License for more details.
16 # You should have received a copy of the GNU General Public License
17 # along with this program. If not, see <http://www.gnu.org/licenses/>.
19 . "${srcdir=.}/init.sh"; path_prepend_ ../src
20 print_ver_ wc
22 echo 2 > 2b || framework_failure_
23 echo 2 words > 2w || framework_failure_
24 printf '2b\n2w\n' |tr '\n' '\0' > names || framework_failure_
27 wc --files0-from=names > out || fail=1
28 cat <<\EOF > exp || fail=1
29 1 1 2 2b
30 1 2 8 2w
31 2 3 10 total
32 EOF
34 compare exp out || fail=1
36 if test "$fail" = ''; then
37 # Repeat the above test, but read the file name list from stdin.
38 rm -f out
39 wc --files0-from=- < names > out || fail=1
40 compare exp out || fail=1
43 Exit $fail