From e4e5ecaf0360c895f6237d73892c0749d4fc06b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jurko=20Gospodneti=C4=87?= Date: Fri, 25 May 2012 18:59:05 +0000 Subject: [PATCH] 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] --- v2/test/core-language/test.jam | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/v2/test/core-language/test.jam b/v2/test/core-language/test.jam index 24dcc2924..64b9e2862 100644 --- a/v2/test/core-language/test.jam +++ b/v2/test/core-language/test.jam @@ -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) ] ; } }