2
0
mirror of https://github.com/boostorg/build.git synced 2026-02-16 01:12:13 +00:00

Made the Boost Build core-language test pass on Windows 7. This test expects certain registry keys to exist under HKLM\SYSTEM\CurrentControlSet but Windows 7 added an additional 'Policies' one there.

[SVN r78626]
This commit is contained in:
Jurko Gospodnetić
2012-05-25 18:59:05 +00:00
parent a08319aa92
commit e4e5ecaf03

View File

@@ -1298,11 +1298,30 @@ if $(NT)
local r2 = [ W32_GETREGNAMES "HKCU\\Control Panel\\Sound" : values ] ;
check-equal w32_getregnames : $(sound:L) : $(r2:L) ;
# On Windows 7 & later there may be an additional 'Policies' key under
# 'CurrentControlSet'.
local rule remove-policies ( param * )
{
local found ;
local r ;
for local x in $(param:L)
{
if ! $(found) && $(x) = "policies"
{
found = true ;
}
else
{
r += $(x) ;
}
}
return $(r) ;
}
local CurrentControlSet = "Control" "Enum" "Hardware Profiles" "Services" ;
local r3 = [ W32_GETREGNAMES "HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet" : subkeys ] ;
check-equal w32_getregnames : $(CurrentControlSet:L) : $(r3:L) ;
check-equal w32_getregnames : $(CurrentControlSet:L) : [ remove-policies $(r3:L) ] ;
local r4 = [ W32_GETREGNAMES "HKLM\\SYSTEM\\CurrentControlSet" : subkeys ] ;
check-equal w32_getregnames : $(CurrentControlSet:L) : $(r4:L) ;
check-equal w32_getregnames : $(CurrentControlSet:L) : [ remove-policies $(r4:L) ] ;
}
}