summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@tavianator.com>2022-02-04 11:31:31 -0500
committerTavian Barnes <tavianator@tavianator.com>2022-02-04 11:31:31 -0500
commitbb067b2e880c5b5373f0da290b192d03b75e7d1f (patch)
tree2aec2ac1d70bf8eb8799ba5183ff9db3f5a4cbf6
parent2d4d6787c4bc62042be4a58a4791074ab2c6a89e (diff)
downloadbfs-bb067b2e880c5b5373f0da290b192d03b75e7d1f.tar.xz
tests: Disable some glob tests on macOS
macOS seems to have a non-compliant fnmatch() that doesn't treat invalid character class expressions literally.
-rwxr-xr-xtests.sh10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests.sh b/tests.sh
index c83b6c6..28226e3 100755
--- a/tests.sh
+++ b/tests.sh
@@ -1313,11 +1313,21 @@ function test_name_character_class() {
}
function test_name_bracket() {
+ if [ "$UNAME" = "Darwin" ]; then
+ # fnmatch() is broken on macOS
+ return 0
+ fi
+
# An unclosed [ should be matched literally
bfs_diff weirdnames -name '['
}
function test_name_backslash() {
+ if [ "$UNAME" = "Darwin" ]; then
+ # fnmatch() is broken on macOS
+ return 0
+ fi
+
# An unescaped \ doesn't match
bfs_diff weirdnames -name '\'
}