* Test for r35770

git-svn-id: trunk@35771 -
This commit is contained in:
joost 2017-04-11 09:39:35 +00:00
parent 977a82b866
commit 31bff45d19

View File

@ -28,6 +28,7 @@ type
procedure TestListPackages;
procedure IntTestListPackages;
procedure TestPackageA;
procedure TestLooseFPMFile;
end;
{ TFullFPCInstallationSetup }
@ -339,6 +340,19 @@ begin
CheckFalse(FileExists(ConcatPaths([TFullFPCInstallationSetup.GetCurrentTestPath,'user','lib','fpc', TFullFPCInstallationSetup.GetCompilerVersion, 'fpmkinst',TFullFPCInstallationSetup.GetTargetString,'PackageA.fpm'])), 'PackageAUnitA.fpm found after uninstall');
end;
procedure TFullFPCInstallationTests.TestLooseFPMFile;
var
F: Text;
s: string;
begin
System.Assign(F, ConcatPaths([TFullFPCInstallationSetup.GetCurrentTestPath, 'lib', 'fpc', TFullFPCInstallationSetup.GetCompilerVersion, 'fpmkinst', TFullFPCInstallationSetup.GetTargetString,'empty.fpm']));
System.Rewrite(F);
System.Close(F);
s := RunFppkgIndir(TFullFPCInstallationSetup.GetCurrentTestPath, ['list'], 'list packages');
Check(pos('Failed to load package "empty"', s) > 0, 'Missing warning that the invalid package is skipped')
end;
Initialization
RegisterTestDecorator(TFullFPCInstallationSetup, TFullFPCInstallationTests);
end.