-
-
Notifications
You must be signed in to change notification settings - Fork 610
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #7299 from kaleidicassociates/fix_issue_17167
Fix issue 17167 - handle long filepaths on Windows merged-on-behalf-of: Walter Bright <WalterBright@users.noreply.github.com>
- Loading branch information
Showing
3 changed files
with
232 additions
and
35 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,24 @@ | ||
| #!/usr/bin/env bash | ||
|
|
||
| set -euo pipefail | ||
|
|
||
| # Test that file paths larger than 248 characters can be used | ||
| # Test CRLF and mixed line ending handling in D lexer. | ||
|
|
||
| name=$(basename "$0" .sh) | ||
| dir=${RESULTS_DIR}/compilable/ | ||
|
|
||
| test_dir=${dir}/${name}/uuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuu | ||
| [[ -d $test_dir ]] || mkdir -p "$test_dir" | ||
| bin_base=${test_dir}/${name} | ||
| bin="$bin_base$OBJ" | ||
| src="$bin_base.d" | ||
|
|
||
| echo 'void main() {}' > "${src}" | ||
|
|
||
| # Only compile, not link, since optlink can't handle long file names | ||
| $DMD -m"${MODEL}" "${DFLAGS}" -c -of"${bin}" "${src}" || exit 1 | ||
|
|
||
| rm -rf "${dir:?}"/"$name" | ||
|
|
||
| echo Success >"${dir}"/"$(basename $0)".out |