IDE: fixed order of syntax options + test (issue #12204)

git-svn-id: trunk@16694 -
This commit is contained in:
vincents 2008-09-24 07:22:02 +00:00
parent 2c8a855666
commit e9fe4e0b49
5 changed files with 82 additions and 7 deletions

3
.gitattributes vendored
View File

@ -3710,6 +3710,9 @@ packager/ufrmaddcomponent.pas svneol=native#text/pascal
startlazarus.app/Contents/Info.plist svneol=native#text/plain
startlazarus.app/Contents/MacOS/startlazarus -text svneol=unset#application/octet
startlazarus.app/Contents/PkgInfo svneol=native#text/plain
test/bugs/12204/bug12204.lpi svneol=native#text/plain
test/bugs/12204/bug12204.pas svneol=native#text/plain
test/bugs/12204/expected.txt svneol=native#text/plain
test/bugs/2068/bug2068.lpi svneol=native#text/plain
test/bugs/2068/bug2068.lpr svneol=native#text/plain
test/bugs/2068/expected.txt svneol=native#text/plain

View File

@ -2339,6 +2339,11 @@ begin
-Mmacpas Macintosh Pascal dialects compatibility mode
}
if SyntaxMode<>'' then
Result:='-M'+SyntaxMode
else
Result:='';
tempsw := '';
if (CStyleOperators) then
@ -2358,15 +2363,10 @@ begin
if (StaticKeyword) then
tempsw := tempsw + 't';
if (tempsw <> '') then
Result := '-S' + tempsw
else
Result:='';
if SyntaxMode<>'' then begin
if (tempsw <> '') then begin
if Result<>'' then
Result:=Result+' ';
Result:=Result+'-M'+SyntaxMode;
Result := Result+'-S' + tempsw;
end;
end;

View File

@ -0,0 +1,57 @@
<?xml version="1.0"?>
<CONFIG>
<ProjectOptions>
<PathDelim Value="\"/>
<Version Value="6"/>
<General>
<Flags>
<MainUnitHasUsesSectionForAllUnits Value="False"/>
<MainUnitHasCreateFormStatements Value="False"/>
<MainUnitHasTitleStatement Value="False"/>
</Flags>
<SessionStorage Value="InIDEConfig"/>
<MainUnit Value="0"/>
<IconPath Value="./"/>
<TargetFileExt Value=".exe"/>
</General>
<VersionInfo>
<ProjectVersion Value=""/>
</VersionInfo>
<PublishOptions>
<Version Value="2"/>
<IgnoreBinaries Value="False"/>
<IncludeFileFilter Value="*.(pas|pp|inc|lfm|lpr|lrs|lpi|lpk|sh|xml)"/>
<ExcludeFileFilter Value="*.(bak|ppu|ppw|o|so);*~;backup"/>
</PublishOptions>
<RunParams>
<local>
<FormatVersion Value="1"/>
<LaunchingApplication PathPlusParams="/usr/X11R6/bin/xterm -T 'Lazarus Run Output' -e $(LazarusDir)/tools/runwait.sh $(TargetCmdLine)"/>
</local>
</RunParams>
<Units Count="2">
<Unit0>
<Filename Value="bug12204.pas"/>
<IsPartOfProject Value="True"/>
<UnitName Value="bug12204"/>
</Unit0>
<Unit1>
<Filename Value="expected.txt"/>
<IsPartOfProject Value="True"/>
</Unit1>
</Units>
</ProjectOptions>
<CompilerOptions>
<Version Value="8"/>
<PathDelim Value="\"/>
<Parsing>
<SyntaxOptions>
<CStyleOperator Value="False"/>
<UseAnsiStrings Value="True"/>
</SyntaxOptions>
</Parsing>
<Other>
<CompilerPath Value="$(CompPath)"/>
</Other>
</CompilerOptions>
</CONFIG>

View File

@ -0,0 +1,13 @@
program bug12204;
var
s1: AnsiString;
s2: string;
begin
s1 := 's1';
WriteLn('s1 = ', s1, ' : ', SizeOf(s1));
s2 := 's2';
WriteLn('s2 = ', s2, ' : ', SizeOf(s2));
end.

View File

@ -0,0 +1,2 @@
s1 = s1 : 4
s2 = s2 : 4