summaryrefslogtreecommitdiff
path: root/tests/misc/truncate-dir-fail
blob: 942c6b4ccb5a26089b9c25b5127dc2725389da68 (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