mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-15 03:29:19 +02:00
pastojs: fixed version check using current version
git-svn-id: trunk@41344 -
This commit is contained in:
parent
fbba24d636
commit
d2203e460c
@ -536,7 +536,7 @@ end;
|
||||
procedure TTestCLI_Precompile.TestPCU_CheckVersionSystem;
|
||||
var
|
||||
aFile: TCLIFile;
|
||||
s, JSFilename, ExpectedSrc: string;
|
||||
s, JSFilename, ExpectedSrc, VerStr: string;
|
||||
begin
|
||||
AddUnit('src/system.pp',[
|
||||
'type integer = longint;'],
|
||||
@ -549,10 +549,11 @@ begin
|
||||
aFile:=FindFile(JSFilename);
|
||||
AssertNotNull('File not found '+JSFilename,aFile);
|
||||
writeln('TTestCLI_Precompile.TestPCU_CheckVersionMain ',aFile.Source);
|
||||
VerStr:=IntToStr((VersionMajor*100+VersionMinor)*100+VersionRelease);
|
||||
ExpectedSrc:=LinesToStr([
|
||||
UTF8BOM+'rtl.module("system",[],function () {',
|
||||
' "use strict";',
|
||||
' rtl.checkVersion(10301);',
|
||||
' rtl.checkVersion('+VerStr+');',
|
||||
' var $mod = this;',
|
||||
'});']);
|
||||
if not CheckSrcDiff(ExpectedSrc,aFile.Source,s) then
|
||||
|
Loading…
Reference in New Issue
Block a user