mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-14 00:59:08 +02:00
* also allow a ";"-separated list of namespaces for -FN
+ added test git-svn-id: trunk@38939 -
This commit is contained in:
parent
d9925f7074
commit
11f673a991
1
.gitattributes
vendored
1
.gitattributes
vendored
@ -13735,6 +13735,7 @@ tests/test/tudots2.pp svneol=native#text/pascal
|
|||||||
tests/test/tudots3.pp svneol=native#text/pascal
|
tests/test/tudots3.pp svneol=native#text/pascal
|
||||||
tests/test/tudots4.pp svneol=native#text/pascal
|
tests/test/tudots4.pp svneol=native#text/pascal
|
||||||
tests/test/tudots5.pp svneol=native#text/pascal
|
tests/test/tudots5.pp svneol=native#text/pascal
|
||||||
|
tests/test/tudots6.pp svneol=native#text/pascal
|
||||||
tests/test/tuglylabels1.pp svneol=native#text/plain
|
tests/test/tuglylabels1.pp svneol=native#text/plain
|
||||||
tests/test/tunaligned1.pp svneol=native#text/plain
|
tests/test/tunaligned1.pp svneol=native#text/plain
|
||||||
tests/test/tunistr1.pp svneol=native#text/plain
|
tests/test/tunistr1.pp svneol=native#text/plain
|
||||||
|
@ -3629,7 +3629,10 @@ var
|
|||||||
i : tfeature;
|
i : tfeature;
|
||||||
j : longint;
|
j : longint;
|
||||||
abi : tabi;
|
abi : tabi;
|
||||||
cmditem: TCmdStrListItem;
|
tmplist : TCmdStrList;
|
||||||
|
cmditem,
|
||||||
|
tmpcmditem : TCmdStrListItem;
|
||||||
|
cmdstr : TCmdStr;
|
||||||
{$if defined(cpucapabilities)}
|
{$if defined(cpucapabilities)}
|
||||||
cpuflag : tcpuflags;
|
cpuflag : tcpuflags;
|
||||||
hs : string;
|
hs : string;
|
||||||
@ -3838,12 +3841,33 @@ begin
|
|||||||
add_package(option.parapackages.NameOfIndex(j),true,true);
|
add_package(option.parapackages.NameOfIndex(j),true,true);
|
||||||
|
|
||||||
{ add default namespaces }
|
{ add default namespaces }
|
||||||
|
tmplist:=TCmdStrList.Create;
|
||||||
cmditem:=TCmdStrListItem(option.paranamespaces.First);
|
cmditem:=TCmdStrListItem(option.paranamespaces.First);
|
||||||
while assigned(cmditem) do
|
while assigned(cmditem) do
|
||||||
begin
|
begin
|
||||||
namespacelist.insert(cmditem.Str);
|
{ use a temporary list cause if ";" are involved we need to reverse the
|
||||||
|
order due to how TCmdStrList behaves }
|
||||||
|
cmdstr:=cmditem.str;
|
||||||
|
repeat
|
||||||
|
j:=Pos(';',cmdstr);
|
||||||
|
if j>0 then
|
||||||
|
begin
|
||||||
|
tmplist.insert(copy(cmdstr,1,j-1));
|
||||||
|
delete(cmdstr,1,j);
|
||||||
|
end
|
||||||
|
else
|
||||||
|
tmplist.insert(cmdstr);
|
||||||
|
until j=0;
|
||||||
|
tmpcmditem:=TCmdStrListItem(tmplist.First);
|
||||||
|
while assigned(tmpcmditem) do
|
||||||
|
begin
|
||||||
|
namespacelist.insert(tmpcmditem.Str);
|
||||||
|
tmpcmditem:=TCmdStrListItem(tmpcmditem.Next);
|
||||||
|
end;
|
||||||
|
tmplist.clear;
|
||||||
cmditem:=TCmdStrListItem(cmditem.Next);
|
cmditem:=TCmdStrListItem(cmditem.Next);
|
||||||
end;
|
end;
|
||||||
|
tmplist.Free;
|
||||||
|
|
||||||
{ add unit environment and exepath to the unit search path }
|
{ add unit environment and exepath to the unit search path }
|
||||||
if inputfilepath<>'' then
|
if inputfilepath<>'' then
|
||||||
|
17
tests/test/tudots6.pp
Normal file
17
tests/test/tudots6.pp
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
{ %OPT="-FNudots;udots.udots" }
|
||||||
|
|
||||||
|
program tudots6;
|
||||||
|
|
||||||
|
uses
|
||||||
|
Unit1, { finds UDots.Unit1 in udots.unit.pp }
|
||||||
|
Unit5; { finds UDots.UDots.Unit5 in udots.udots.unit5.pp }
|
||||||
|
|
||||||
|
begin
|
||||||
|
if Unit1Str <> 'UDots.Unit1' then
|
||||||
|
Halt(1);
|
||||||
|
if Unit5Str <> 'UDots.UDots.Unit5' then
|
||||||
|
Halt(2);
|
||||||
|
|
||||||
|
Writeln('ok');
|
||||||
|
end.
|
||||||
|
|
Loading…
Reference in New Issue
Block a user