-
-
Notifications
You must be signed in to change notification settings - Fork 609
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 #7798 from marler8997/bug18322
Fix issue 18322: __FILE_FULL_PATH__ doesn't work as a template parameter merged-on-behalf-of: Mike Franklin <JinShil@users.noreply.github.com>
- Loading branch information
Showing
11 changed files
with
70 additions
and
41 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
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
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
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,14 @@ | ||
| module test18322import; | ||
| void fun(string templateFileFullPath = __FILE_FULL_PATH__, | ||
| string templateFile = __FILE__)(string expectedFilename, string fileFullPath = __FILE_FULL_PATH__) | ||
| { | ||
| // make sure it is an absolute path | ||
| version(Windows) | ||
| assert(fileFullPath[1..3] == ":\\"); | ||
| else | ||
| assert(fileFullPath[0] == '/'); | ||
|
|
||
| assert(templateFileFullPath == fileFullPath); | ||
| assert(fileFullPath[$ - expectedFilename.length .. $] == expectedFilename); | ||
| assert(fileFullPath[$ - templateFile.length .. $] == templateFile); | ||
| } |
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,21 @@ | ||
| /* | ||
| REQUIRED_ARGS: -Irunnable/imports | ||
| COMPILED_IMPORTS: imports/test18322import.d | ||
| PERMUTE_ARGS: | ||
| */ | ||
| import test18322import; | ||
| void main(){ | ||
| version(Windows) | ||
| auto sep = "\\"; | ||
| else | ||
| auto sep = "/"; | ||
|
|
||
| auto filename = "runnable" ~ sep ~ "test18322.d"; | ||
|
|
||
| fun(filename); | ||
| mixin(`fun(filename ~ "-mixin-16");`); | ||
|
|
||
| #line 100 "poundlinefile.d" | ||
| fun("poundlinefile.d"); | ||
| mixin(`fun("poundlinefile.d-mixin-101");`); | ||
| } |