summaryrefslogtreecommitdiffstats
path: root/tests.sh
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@tavianator.com>2021-03-28 15:20:20 -0400
committerTavian Barnes <tavianator@tavianator.com>2021-03-28 15:20:20 -0400
commit48dfba55b283120a534f0e5ed9c0f4ee694ad5df (patch)
treeadc45bacb3b3d518df3dfc2acbc55f889bd8c561 /tests.sh
parentcd4b0f1d87e836e78c2de92623e20284a057b500 (diff)
downloadbfs-48dfba55b283120a534f0e5ed9c0f4ee694ad5df.tar.xz
test: Add more tests for -H/-L and -type l
Diffstat (limited to 'tests.sh')
-rwxr-xr-xtests.sh18
1 files changed, 17 insertions, 1 deletions
diff --git a/tests.sh b/tests.sh
index 8eb4dc0..81ed14e 100755
--- a/tests.sh
+++ b/tests.sh
@@ -274,6 +274,9 @@ posix_tests=(
test_type_d
test_type_f
+ test_type_l
+ test_H_type_l
+ test_L_type_l
test_user_name
test_user_id
@@ -886,6 +889,7 @@ function make_links() {
mkdir -p "$1/deeply/nested/dir"
touchp "$1/deeply/nested/file"
ln -s file "$1/deeply/nested/link"
+ ln -s nowhere "$1/deeply/nested/broken"
ln -s deeply/nested "$1/skip"
}
make_links "$TMP/links"
@@ -1124,6 +1128,18 @@ function test_type_f() {
bfs_diff basic -type f
}
+function test_type_l() {
+ bfs_diff links/skip -type l
+}
+
+function test_H_type_l() {
+ bfs_diff -H links/skip -type l
+}
+
+function test_L_type_l() {
+ bfs_diff -L links/skip -type l
+}
+
function test_type_multi() {
bfs_diff links -type f,d,c
}
@@ -2150,7 +2166,7 @@ function test_printf_u_g_ulimit() {
}
function test_printf_l_nonlink() {
- bfs_diff links -printf '| %24p -> %-24l |\n'
+ bfs_diff links -printf '| %26p -> %-26l |\n'
}
function test_printf_incomplete_escape() {