mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-13 11:24:14 +02:00
* support {$i *.ext} to include source files with the same base name, but
with a different extension than the current source file (mantis #13696) git-svn-id: trunk@13163 -
This commit is contained in:
parent
9a0808d0fb
commit
b59d1f724b
2
.gitattributes
vendored
2
.gitattributes
vendored
@ -8866,6 +8866,8 @@ tests/webtbs/tw13628b.pp svneol=native#text/plain
|
||||
tests/webtbs/tw13639.pp svneol=native#text/plain
|
||||
tests/webtbs/tw1364.pp svneol=native#text/plain
|
||||
tests/webtbs/tw1365.pp svneol=native#text/plain
|
||||
tests/webtbs/tw13696.inc svneol=native#text/plain
|
||||
tests/webtbs/tw13696.pp svneol=native#text/plain
|
||||
tests/webtbs/tw1374.pp svneol=native#text/plain
|
||||
tests/webtbs/tw1375.pp svneol=native#text/plain
|
||||
tests/webtbs/tw1376.pp svneol=native#text/plain
|
||||
|
@ -1682,6 +1682,12 @@ In case not, the value returned can be arbitrary.
|
||||
hs:=FixFileName(hs);
|
||||
path:=ExtractFilePath(hs);
|
||||
name:=ExtractFileName(hs);
|
||||
{ Special case for Delphi compatibility: '*' has to be replaced
|
||||
by the file name of the current source file. }
|
||||
if (length(name)>=1) and
|
||||
(name[1]='*') then
|
||||
name:=ChangeFileExt(current_module.sourcefiles.get_file_name(current_filepos.fileindex),'')+ExtractFileExt(name);
|
||||
|
||||
{ try to find the file }
|
||||
found:=findincludefile(path,name,foundfile);
|
||||
if (ExtractFileExt(name)='') then
|
||||
|
3
tests/webtbs/tw13696.inc
Normal file
3
tests/webtbs/tw13696.inc
Normal file
@ -0,0 +1,3 @@
|
||||
procedure test;
|
||||
begin
|
||||
end;
|
7
tests/webtbs/tw13696.pp
Normal file
7
tests/webtbs/tw13696.pp
Normal file
@ -0,0 +1,7 @@
|
||||
{ %norun }
|
||||
|
||||
{$i *.inc}
|
||||
|
||||
begin
|
||||
test;
|
||||
end.
|
Loading…
Reference in New Issue
Block a user