-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Test setting symlink type via CYGWIN env var
- Loading branch information
1 parent
49f298a
commit d3ac917
Showing
3 changed files
with
61 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
#!/usr/bin/bash | ||
|
||
TEST_FILE="/usr/bin/apropos" | ||
echo "cygpath -w ${TEST_FILE} returns $(cygpath -w ${TEST_FILE})" | ||
# don't convert using cygpath -w, as that canonicalizes symlinks ?!? | ||
TEST_FILE_W="C:\cygwin\bin\apropos" | ||
|
||
# check the symlink we're going to do checks on exists | ||
if [ ! -L ${TEST_FILE} ]; then | ||
echo "This test assumes ${TEST_FILE} exists and is a symlink" | ||
exit 1 | ||
fi | ||
|
||
# check the symlink was created in the way expected | ||
case ${CYGWIN} in | ||
*sys*) | ||
cmd /c "dir /AS ${TEST_FILE_W}" | grep "21" | ||
;; | ||
|
||
*native*) | ||
cmd /c "dir /AL ${TEST_FILE_W}" | grep "<SYMLINK>" | ||
;; | ||
|
||
*wsl*) | ||
fsutil reparsepoint query ${TEST_FILE_W} | grep "0xa000001d" | ||
;; | ||
esac |