summaryrefslogtreecommitdiffstats
path: root/tests.sh
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@tavianator.com>2016-11-13 15:08:33 -0500
committerTavian Barnes <tavianator@tavianator.com>2016-11-13 15:44:48 -0500
commit58b4741d3d8eb50bd265e0aa5603923c1e3c04c4 (patch)
tree8ac8a78995df61d92359e33f5fcbc9a8299e9546 /tests.sh
parent1c5168342e5248983d3a7929abaebe16ca3640a3 (diff)
downloadbfs-58b4741d3d8eb50bd265e0aa5603923c1e3c04c4.tar.xz
Redirect stdin from /dev/null for -ok and -okdir.
Diffstat (limited to 'tests.sh')
-rwxr-xr-xtests.sh12
1 files changed, 11 insertions, 1 deletions
diff --git a/tests.sh b/tests.sh
index 51f891c..87a0ea1 100755
--- a/tests.sh
+++ b/tests.sh
@@ -434,7 +434,17 @@ function test_0078() {
! "$BFS" "$perms" -perm +777 2>/dev/null
}
-for i in {1..78}; do
+function test_0079() {
+ # -ok should close stdin for the executed command
+ yes | "$BFS" "$basic" -ok cat ';' 2>/dev/null
+}
+
+function test_0080() {
+ # -okdir should close stdin for the executed command
+ yes | "$BFS" "$basic" -okdir cat ';' 2>/dev/null
+}
+
+for i in {1..80}; do
test="test_$(printf '%04d' $i)"
if [ -t 1 ]; then