summaryrefslogtreecommitdiffstats
path: root/tests.sh
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@tavianator.com>2021-10-01 11:13:12 -0400
committerTavian Barnes <tavianator@tavianator.com>2021-10-01 11:26:11 -0400
commitd1c441d3c80abfa6d6cb877270f200cc4edb6364 (patch)
tree71b7d9240d4784829dabb387f899f1bbaac20b23 /tests.sh
parentf1d209d939b21ffc031001a9fddd37466e12fc8d (diff)
downloadbfs-d1c441d3c80abfa6d6cb877270f200cc4edb6364.tar.xz
tests: Add tests for parsing invalid integers
And give some better error messages.
Diffstat (limited to 'tests.sh')
-rwxr-xr-xtests.sh21
1 files changed, 21 insertions, 0 deletions
diff --git a/tests.sh b/tests.sh
index bfbbf9d..01b5a42 100755
--- a/tests.sh
+++ b/tests.sh
@@ -738,6 +738,11 @@ bfs_tests=(
test_hidden
test_hidden_root
+ test_links_noarg
+ test_links_empty
+ test_links_negative
+ test_links_invalid
+
test_newerma_nonexistent
test_newermt_invalid
test_newermq
@@ -1348,6 +1353,22 @@ function test_links_minus() {
bfs_diff links -type f -links -2
}
+function test_links_noarg() {
+ ! quiet invoke_bfs links -links
+}
+
+function test_links_empty() {
+ ! quiet invoke_bfs links -links ''
+}
+
+function test_links_negative() {
+ ! quiet invoke_bfs links -links +-1
+}
+
+function test_links_invalid() {
+ ! quiet invoke_bfs links -links ASDF
+}
+
function test_P() {
bfs_diff -P links/deeply/nested/dir
}