summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@tavianator.com>2022-02-01 16:43:20 -0500
committerTavian Barnes <tavianator@tavianator.com>2022-02-01 16:43:20 -0500
commit6b1ecc327f2a1931342ecee1bebc247fa455c678 (patch)
tree1c213bb45df377537a29a2b7c1ff1f1866be9aa2
parent66dc98dfcc72a1fd928d57d3b9cbe88e7481dba0 (diff)
downloadbfs-6b1ecc327f2a1931342ecee1bebc247fa455c678.tar.xz
tests: New tests for -i?wholename
-rwxr-xr-xtests.sh12
-rw-r--r--tests/test_iwholename.out7
-rw-r--r--tests/test_wholename.out7
3 files changed, 26 insertions, 0 deletions
diff --git a/tests.sh b/tests.sh
index 1624d18..0990110 100755
--- a/tests.sh
+++ b/tests.sh
@@ -550,6 +550,8 @@ gnu_tests=(
test_iregex
+ test_iwholename
+
test_lname
test_L_lname
@@ -641,6 +643,8 @@ gnu_tests=(
test_uid_minus
test_uid_minus_plus
+ test_wholename
+
test_writable
test_xtype_l
@@ -1301,6 +1305,10 @@ function test_path() {
bfs_diff basic -path 'basic/*f*'
}
+function test_wholename() {
+ bfs_diff basic -wholename 'basic/*f*'
+}
+
function test_true() {
bfs_diff basic -true
}
@@ -1570,6 +1578,10 @@ function test_ipath() {
bfs_diff basic -ipath 'basic/*F*'
}
+function test_iwholename() {
+ bfs_diff basic -iwholename 'basic/*F*'
+}
+
function test_lname() {
bfs_diff links -lname '[aq]'
}
diff --git a/tests/test_iwholename.out b/tests/test_iwholename.out
new file mode 100644
index 0000000..0d36df9
--- /dev/null
+++ b/tests/test_iwholename.out
@@ -0,0 +1,7 @@
+basic/e/f
+basic/j/foo
+basic/k/foo
+basic/l/foo
+basic/k/foo/bar
+basic/l/foo/bar
+basic/l/foo/bar/baz
diff --git a/tests/test_wholename.out b/tests/test_wholename.out
new file mode 100644
index 0000000..0d36df9
--- /dev/null
+++ b/tests/test_wholename.out
@@ -0,0 +1,7 @@
+basic/e/f
+basic/j/foo
+basic/k/foo
+basic/l/foo
+basic/k/foo/bar
+basic/l/foo/bar
+basic/l/foo/bar/baz