fix(windows): unit test os version

This commit is contained in:
Marc Durdin 2021-09-29 12:12:48 +10:00
parent 66ddceadda
commit dac9e80c97
3 changed files with 22 additions and 2 deletions

View file

@ -0,0 +1,18 @@
unit GetOsVersion;
interface
// This is a stub version of GetOsVersion for unit tests
type
TOS = (osLegacy, osVista, osWin7, osWin8, osWin10, osOther);
function GetOs: TOS;
implementation
function GetOs: TOS;
begin
Result := osWin10;
end;
end.

View file

@ -22,7 +22,8 @@ uses
Keyman.System.Standards.LangTagsRegistry in '..\..\global\delphi\standards\Keyman.System.Standards.LangTagsRegistry.pas',
Keyman.System.Standards.LCIDToBCP47Registry in '..\..\global\delphi\standards\Keyman.System.Standards.LCIDToBCP47Registry.pas',
utilstr in '..\..\global\delphi\general\utilstr.pas',
Unicode in '..\..\global\delphi\general\Unicode.pas';
Unicode in '..\..\global\delphi\general\Unicode.pas',
GetOsVersion in 'GetOsVersion.pas';
var
runner : ITestRunner;

View file

@ -96,6 +96,7 @@
<DCCReference Include="..\..\global\delphi\standards\Keyman.System.Standards.LCIDToBCP47Registry.pas"/>
<DCCReference Include="..\..\global\delphi\general\utilstr.pas"/>
<DCCReference Include="..\..\global\delphi\general\Unicode.pas"/>
<DCCReference Include="GetOsVersion.pas"/>
<BuildConfiguration Include="Release">
<Key>Cfg_2</Key>
<CfgParent>Base</CfgParent>
@ -133,7 +134,7 @@
<Overwrite>true</Overwrite>
</Platform>
</DeployFile>
<DeployFile LocalName="Win32\Debug\standardsdata.exe" Configuration="Debug" Class="ProjectOutput">
<DeployFile LocalName="bin\Win32\Debug\standardsdata.exe" Configuration="Debug" Class="ProjectOutput">
<Platform Name="Win32">
<RemoteName>standardsdata.exe</RemoteName>
<Overwrite>true</Overwrite>