fork/fish-shell

git clone https://git.julia.blue/fork/fish-shell

NahorFix failing system tests on Cygwin440e7fcbc

master
865 B25 linesraw
1#RUN: fish=%fish %fish %s
2
3# Set a XDG_CONFIG_HOME with both pre-existing and non-existing directories.
4set -l dir (mktemp -d)
5mkdir -m 0755 $dir/old
6set -gx XDG_CONFIG_HOME $dir/old/new
7
8# Launch fish so it will create all missing directories.
9$fish -c ''
10
11# Check that existing directories kept their permissions, and new directories
12# have the right permissions according to the XDG Base Directory Specification.
13# Use command ls and awk to strip off xattr or SELinux indicators.
14command ls -ld $dir/old | awk '{print substr($1, 1, 10)}'
15# CHECK: drwxr-xr-x
16
17set -l ls_result "$(command ls -ld $dir/old/new $dir/old/new/fish | awk '{print substr($1, 1, 10)}')"
18if cygwin_noacl $dir
19    # No permission support => fake the result
20    string replace -a drwxr-xr-x drwx------ $ls_result
21else
22    printf "%s" "$ls_result"
23end
24# CHECK: drwx------
25# CHECK: drwx------