aboutsummaryrefslogtreecommitdiff
path: root/tests/truncate/13.t
diff options
context:
space:
mode:
authorEnji Cooper <ngie@FreeBSD.org>2014-09-09 02:50:09 +0000
committerEnji Cooper <ngie@FreeBSD.org>2014-09-09 02:50:09 +0000
commit9a56205fc912cc30c498cd8ab536eef96373b16f (patch)
treebd5f561604ac7481d7b8cdb06fb9cc3ba6e1512d /tests/truncate/13.t
This vendor import code was obtained from https://github.com/pjd/pjdfstest/commit/abf03c3a47745d4521b0e4aa141317553ca48f91 Approved by: rpaulo (mentor) Phabric: D743 Sponsored by: EMC / Isilon Storage Division
Notes
Notes: svn path=/vendor/pjdfstest/dist/; revision=271294 svn path=/vendor/pjdfstest/abf03c3a47745d4521b0e4aa141317553ca48f91/; revision=271295; tag=vendor/pjdfstest/abf03c3a47745d4521b0e4aa141317553ca48f91
Diffstat (limited to 'tests/truncate/13.t')
-rw-r--r--tests/truncate/13.t16
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/truncate/13.t b/tests/truncate/13.t
new file mode 100644
index 000000000000..7c9f0d4e14ec
--- /dev/null
+++ b/tests/truncate/13.t
@@ -0,0 +1,16 @@
+#!/bin/sh
+# $FreeBSD: head/tools/regression/pjdfstest/tests/truncate/13.t 211352 2010-08-15 21:24:17Z pjd $
+
+desc="truncate returns EINVAL if the length argument was less than 0"
+
+dir=`dirname $0`
+. ${dir}/../misc.sh
+
+echo "1..4"
+
+n0=`namegen`
+
+expect 0 create ${n0} 0644
+expect EINVAL -- truncate ${n0} -1
+expect EINVAL -- truncate ${n0} -999999
+expect 0 unlink ${n0}