summaryrefslogtreecommitdiff
path: root/tests/misc/truncate-dir-fail
blob: 3ae918e76e98d675e065a8ad665e85fdf8c8f140 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#!/bin/sh
# Make sure truncate fails for a directory.

if test "$VERBOSE" = yes; then
  set -x
  truncate --version
fi

. $srcdir/test-lib.sh

# truncate on dir not allowed
truncate -s+0 . && fail=1 || fail=0

(exit $fail); exit $fail