From 48dfba55b283120a534f0e5ed9c0f4ee694ad5df Mon Sep 17 00:00:00 2001 From: Tavian Barnes Date: Sun, 28 Mar 2021 15:20:20 -0400 Subject: test: Add more tests for -H/-L and -type l --- tests.sh | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) (limited to 'tests.sh') 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() { -- cgit v1.2.3