mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-11 10:29:21 +02:00
pastojs: fixed test on windows
This commit is contained in:
parent
87d084dd21
commit
322503678d
@ -32,6 +32,7 @@ const
|
||||
// default parser+scanner options
|
||||
po_tcmodules = po_Pas2js+[po_KeepScannerError];
|
||||
co_tcmodules = [];
|
||||
JSONNewLine = {$IFDEF Windows}'\r\n'{$ELSE}'\n'{$ENDIF};
|
||||
type
|
||||
TSrcMarkerKind = (
|
||||
mkLabel,
|
||||
@ -8877,11 +8878,11 @@ begin
|
||||
CheckSource('TestStringConst_Multiline',
|
||||
LinesToStr([
|
||||
'this.a = "";',
|
||||
'this.b = "\nline";',
|
||||
'this.b = "'+JSONNewLine+'line";',
|
||||
'this.c = "Single";',
|
||||
'this.d = "`";',
|
||||
'this.e = "abc`xyz";',
|
||||
'this.f = "first''line\n second''line\n";',
|
||||
'this.f = "first''line'+JSONNewLine+' second''line\n";',
|
||||
'']),
|
||||
LinesToStr([
|
||||
]));
|
||||
|
@ -877,7 +877,7 @@ begin
|
||||
AddUnit('unit1.pas',
|
||||
['var a: longint;'],
|
||||
['']);
|
||||
AddUnit('sub/unit1.pas',
|
||||
AddUnit('sub'+PathDelim+'unit1.pas',
|
||||
['var b: longint;'],
|
||||
['']);
|
||||
AddFile('test1.pas',[
|
||||
@ -887,7 +887,7 @@ begin
|
||||
' a:=b;',
|
||||
'end.']);
|
||||
Compile(['test1.pas','-Jc'],ExitCodeSyntaxError);
|
||||
AssertEquals('ErrorMsg','Duplicate file found: "'+WorkDir+'sub/unit1.pas" and "'+WorkDir+'unit1.pas"',ErrorMsg);
|
||||
AssertEquals('ErrorMsg','Duplicate file found: "'+WorkDir+'sub'+PathDelim+'unit1.pas" and "'+WorkDir+'unit1.pas"',ErrorMsg);
|
||||
end;
|
||||
|
||||
procedure TTestCLI_UnitSearch.TestUS_UsesInFile_IndirectDuplicate;
|
||||
@ -897,7 +897,7 @@ begin
|
||||
AddUnit('unit1.pas',
|
||||
['var a: longint;'],
|
||||
['']);
|
||||
AddUnit('sub/unit1.pas',
|
||||
AddUnit('sub'+PathDelim+'unit1.pas',
|
||||
['var b: longint;'],
|
||||
['']);
|
||||
AddUnit('unit2.pas',
|
||||
@ -908,7 +908,7 @@ begin
|
||||
'begin',
|
||||
'end.']);
|
||||
Compile(['test1.pas','-Jc'],ExitCodeSyntaxError);
|
||||
AssertEquals('ErrorMsg','Duplicate file found: "'+WorkDir+'unit1.pas" and "'+WorkDir+'sub/unit1.pas"',ErrorMsg);
|
||||
AssertEquals('ErrorMsg','Duplicate file found: "'+WorkDir+'unit1.pas" and "'+WorkDir+'sub'+PathDelim+'unit1.pas"',ErrorMsg);
|
||||
end;
|
||||
|
||||
procedure TTestCLI_UnitSearch.TestUS_UsesInFile_WorkNotEqProgDir;
|
||||
|
Loading…
Reference in New Issue
Block a user