diff options
author | Tavian Barnes <tavianator@tavianator.com> | 2021-10-01 10:37:57 -0400 |
---|---|---|
committer | Tavian Barnes <tavianator@tavianator.com> | 2021-10-01 11:26:11 -0400 |
commit | f1d209d939b21ffc031001a9fddd37466e12fc8d (patch) | |
tree | 255fb67f7f1ae7fb14d1f3133e1d85bce69e81bd /tests.sh | |
parent | 23f2cfcce3e9c78ddf2b1ab20e8adb15adde0a3c (diff) | |
download | bfs-f1d209d939b21ffc031001a9fddd37466e12fc8d.tar.xz |
tests: Add a tests for missing and nonexistent paths
Diffstat (limited to 'tests.sh')
-rwxr-xr-x | tests.sh | 20 |
1 files changed, 20 insertions, 0 deletions
@@ -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" |