summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@tavianator.com>2021-10-01 10:37:57 -0400
committerTavian Barnes <tavianator@tavianator.com>2021-10-01 11:26:11 -0400
commitf1d209d939b21ffc031001a9fddd37466e12fc8d (patch)
tree255fb67f7f1ae7fb14d1f3133e1d85bce69e81bd
parent23f2cfcce3e9c78ddf2b1ab20e8adb15adde0a3c (diff)
downloadbfs-f1d209d939b21ffc031001a9fddd37466e12fc8d.tar.xz
tests: Add a tests for missing and nonexistent paths
-rwxr-xr-xtests.sh20
1 files changed, 20 insertions, 0 deletions
diff --git a/tests.sh b/tests.sh
index 01ff9c0..bfbbf9d 100755
--- a/tests.sh
+++ b/tests.sh
@@ -518,11 +518,15 @@ gnu_tests=(
test_fprint
test_fprint_duplicate
test_fprint_error
+ test_fprint_noarg
+ test_fprint_nonexistent
test_fprint_truncate
test_fprint0
test_fprintf
+ test_fprintf_nofile
+ test_fprintf_noformat
test_fstype
@@ -1727,6 +1731,14 @@ function test_fprint_duplicate_stdout() {
fi
}
+function test_fprint_noarg() {
+ ! quiet invoke_bfs basic -fprint
+}
+
+function test_fprint_nonexistent() {
+ ! quiet invoke_bfs basic -fprint scratch/nonexistent/path
+}
+
function test_fprint_truncate() {
printf "basic\nbasic\n" >scratch/test_fprint_truncate.out
@@ -2281,6 +2293,14 @@ function test_fprintf() {
fi
}
+function test_fprintf_nofile() {
+ ! quiet invoke_bfs basic -fprintf
+}
+
+function test_fprintf_noformat() {
+ ! quiet invoke_bfs basic -fprintf /dev/null
+}
+
function test_fstype() {
fstype="$(invoke_bfs basic -maxdepth 0 -printf '%F\n')"
bfs_diff basic -fstype "$fstype"