Skip to content

Commit

Permalink
Disable cd-without-permission test on macOS < 12
Browse files Browse the repository at this point in the history
This allows the tests to pass on older macOS, before O_SEARCH was introduced.
  • Loading branch information
ridiculousfish committed May 11, 2024
1 parent 172fb22 commit 32ba8d9
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions tests/checks/cd.fish
Expand Up @@ -272,8 +272,16 @@ complete -C'cd .'
# CHECK: ../
# CHECK: ./

# Check that cd works with minimal permissions (issue #10432)
begin
# Check that cd works with minimal permissions (issue #10432).
# This is first supported on macOS 12.
# `sysctl kern.osproductversion` emits something like:
# kern.osproductversion: 14.3.1
if test (uname) = "Darwin" && test (sysctl kern.osproductversion | string match -r \\d+) -lt 12
# Not supported. Satisfy the CHECKs below.
echo fake/a
echo fake/a/b
echo c
else
set -l oldpwd (pwd)
set -l tmp (mktemp -d)
cd $tmp
Expand Down

0 comments on commit 32ba8d9

Please sign in to comment.