From c7c8a03a3783cfeb342f033a7cac0dcbe948bbb9 Mon Sep 17 00:00:00 2001 From: Tavian Barnes Date: Thu, 26 Nov 2020 21:47:31 -0500 Subject: eval: Make -hidden behave consistently Previously there was an unexpected difference between $ bfs .hidden -hidden and $ bfs ./.hidden -hidden ./.hidden The intent of the code was to avoid considering `.`, the default starting point, as hidden and thus pruning a whole search with -nohidden. Fix it to do that explicitly, and handle `..` too. --- tests.sh | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'tests.sh') diff --git a/tests.sh b/tests.sh index 65eb104..0e1a964 100755 --- a/tests.sh +++ b/tests.sh @@ -681,6 +681,7 @@ bfs_tests=( test_help test_hidden + test_hidden_root test_newerma_nonexistent test_newermt_invalid @@ -1890,6 +1891,11 @@ function test_hidden() { bfs_diff weirdnames -hidden } +function test_hidden_root() { + cd weirdnames + bfs_diff . ./. ... ./... .../.. -hidden +} + function test_nohidden() { bfs_diff weirdnames -nohidden } -- cgit v1.2.3