* interpret -daaa:=bbb after -Sm was passed as a macro definition, resolves #27529

git-svn-id: trunk@30271 -
This commit is contained in:
florian 2015-03-22 10:20:37 +00:00
parent 36e79a874e
commit 3396e2e1f4
3 changed files with 24 additions and 1 deletions

1
.gitattributes vendored
View File

@ -14330,6 +14330,7 @@ tests/webtbs/tw2738.pp svneol=native#text/plain
tests/webtbs/tw2739.pp svneol=native#text/plain
tests/webtbs/tw27424.pp svneol=native#text/pascal
tests/webtbs/tw27515.pp svneol=native#text/pascal
tests/webtbs/tw27529.pp svneol=native#text/pascal
tests/webtbs/tw2758.pp svneol=native#text/plain
tests/webtbs/tw2763.pp svneol=native#text/plain
tests/webtbs/tw27634.pp svneol=native#text/plain

View File

@ -1349,7 +1349,12 @@ begin
StopOptions(1);
end;
if l>0 then
set_system_compvar(hs,Copy(more,l+2,255))
begin
if cs_support_macro in init_settings.moduleswitches then
set_system_macro(hs,Copy(more,l+2,255))
else
set_system_compvar(hs,Copy(more,l+2,255));
end
else
def_system_macro(hs);
end;

17
tests/webtbs/tw27529.pp Normal file
View File

@ -0,0 +1,17 @@
{ %OPT=-Sm -dMY_VAR:=123 }
program test;
{$IF DEFINED(MY_VAR)}
{$INFO MY_VAR defined}
{$IF MY_VAR=123}
{$INFO MY_VAR = 123}
{$ELSE}
{$INFO MY_VAR <> 123}
{$ENDIF}
{$ENDIF}
begin
writeln(MY_VAR);
if MY_VAR<>123 then
halt(1);
end.