publish changes
This commit is contained in:
parent
afc5064a7b
commit
ac2c6ac843
1605 changed files with 3354 additions and 3354 deletions
|
@ -70,7 +70,7 @@
|
|||
local f = field.get("targetextension")
|
||||
configset.addblock(cset, { "Windows" })
|
||||
configset.store(cset, f, ".dll")
|
||||
test.isequal(".dll", configset.fetch(cset, f, { "windows" }))
|
||||
test.isequal(".dll", configset.fetch(cset, f, { "arch" }))
|
||||
end
|
||||
|
||||
|
||||
|
@ -140,9 +140,9 @@
|
|||
function suite.lists_mergeValues_onFetch()
|
||||
local f = field.get("buildoptions")
|
||||
configset.store(cset, f, "v1")
|
||||
configset.addblock(cset, { "windows" })
|
||||
configset.addblock(cset, { "arch" })
|
||||
configset.store(cset, f, "v2")
|
||||
test.isequal({"v1", "v2"}, configset.fetch(cset, f, {"windows"}))
|
||||
test.isequal({"v1", "v2"}, configset.fetch(cset, f, {"arch"}))
|
||||
end
|
||||
|
||||
|
||||
|
@ -154,7 +154,7 @@
|
|||
local f = field.get("buildoptions")
|
||||
configset.store(cset, f, "v1")
|
||||
configset.store(cset, f, "v2")
|
||||
test.isequal({"v1", "v2"}, configset.fetch(cset, f, {"windows"}))
|
||||
test.isequal({"v1", "v2"}, configset.fetch(cset, f, {"arch"}))
|
||||
end
|
||||
|
||||
|
||||
|
@ -219,9 +219,9 @@
|
|||
function suite.keyed_mergesKeys_onFetch()
|
||||
local f = field.get("configmap")
|
||||
configset.store(cset, f, { Debug="Debug", Release="Release" })
|
||||
configset.addblock(cset, { "windows" })
|
||||
configset.addblock(cset, { "arch" })
|
||||
configset.store(cset, f, { Profile="Profile" })
|
||||
local x = configset.fetch(cset, f, {"windows"})
|
||||
local x = configset.fetch(cset, f, {"arch"})
|
||||
test.istrue(x[1].Debug and x[1].Release and x[2].Profile)
|
||||
end
|
||||
|
||||
|
@ -234,7 +234,7 @@
|
|||
local f = field.get("configmap")
|
||||
configset.store(cset, f, { Debug="Debug", Release="Release" })
|
||||
configset.store(cset, f, { Profile="Profile" })
|
||||
local x = configset.fetch(cset, f, {"windows"})
|
||||
local x = configset.fetch(cset, f, {"arch"})
|
||||
test.istrue(x[1].Debug and x[1].Release and x[2].Profile)
|
||||
end
|
||||
|
||||
|
@ -246,9 +246,9 @@
|
|||
function suite.keyed_overwritesValues_onNonMergeFetch()
|
||||
local f = field.get("configmap")
|
||||
configset.store(cset, f, { Debug="Debug" })
|
||||
configset.addblock(cset, { "windows" })
|
||||
configset.addblock(cset, { "arch" })
|
||||
configset.store(cset, f, { Debug="Development" })
|
||||
local x = configset.fetch(cset, f, {"windows"})
|
||||
local x = configset.fetch(cset, f, {"arch"})
|
||||
test.isequal({"Development"}, x[2].Debug)
|
||||
end
|
||||
|
||||
|
@ -256,6 +256,6 @@
|
|||
local f = field.get("configmap")
|
||||
configset.store(cset, f, { Debug="Debug" })
|
||||
configset.store(cset, f, { Debug="Development" })
|
||||
local x = configset.fetch(cset, f, {"windows"})
|
||||
local x = configset.fetch(cset, f, {"arch"})
|
||||
test.isequal({"Development"}, x[2].Debug)
|
||||
end
|
||||
|
|
|
@ -61,22 +61,22 @@
|
|||
--
|
||||
|
||||
function suite.matches_fails_onMatchWithNotModifier_afterPrefix()
|
||||
crit = criteria.new { "system:not windows" }
|
||||
test.isfalse(criteria.matches(crit, { system="windows" }))
|
||||
crit = criteria.new { "system:not arch" }
|
||||
test.isfalse(criteria.matches(crit, { system="arch" }))
|
||||
end
|
||||
|
||||
function suite.matches_fails_onMatchWithNotModifier_beforePrefix()
|
||||
crit = criteria.new { "not system:windows" }
|
||||
test.isfalse(criteria.matches(crit, { system="windows" }))
|
||||
crit = criteria.new { "not system:arch" }
|
||||
test.isfalse(criteria.matches(crit, { system="arch" }))
|
||||
end
|
||||
|
||||
function suite.matches_passes_onMissWithNotModifier_afterPrefix()
|
||||
crit = criteria.new { "system:not windows" }
|
||||
crit = criteria.new { "system:not arch" }
|
||||
test.istrue(criteria.matches(crit, { system="linux" }))
|
||||
end
|
||||
|
||||
function suite.matches_passes_onMissWithNotModifier_beforePrefix()
|
||||
crit = criteria.new { "not system:windows" }
|
||||
crit = criteria.new { "not system:arch" }
|
||||
test.istrue(criteria.matches(crit, { system="linux" }))
|
||||
end
|
||||
|
||||
|
@ -91,42 +91,42 @@
|
|||
--
|
||||
|
||||
function suite.matches_passes_onFirstOrTermMatched()
|
||||
crit = criteria.new { "system:windows or linux" }
|
||||
test.istrue(criteria.matches(crit, { system="windows" }))
|
||||
crit = criteria.new { "system:arch or linux" }
|
||||
test.istrue(criteria.matches(crit, { system="arch" }))
|
||||
end
|
||||
|
||||
function suite.matches_passes_onSecondOrTermMatched()
|
||||
crit = criteria.new { "system:windows or linux" }
|
||||
crit = criteria.new { "system:arch or linux" }
|
||||
test.istrue(criteria.matches(crit, { system="linux" }))
|
||||
end
|
||||
|
||||
function suite.matches_passes_onThirdOrTermMatched()
|
||||
crit = criteria.new { "system:windows or linux or vs2005" }
|
||||
crit = criteria.new { "system:arch or linux or vs2005" }
|
||||
test.istrue(criteria.matches(crit, { system="vs2005" }))
|
||||
end
|
||||
|
||||
function suite.matches_fails_onNoOrTermMatched()
|
||||
crit = criteria.new { "system:windows or linux" }
|
||||
crit = criteria.new { "system:arch or linux" }
|
||||
test.isfalse(criteria.matches(crit, { system="vs2005" }))
|
||||
end
|
||||
|
||||
function suite.matches_passes_onMixedPrefixes_firstTermMatched_projectContext()
|
||||
crit = criteria.new { "system:windows or files:core*" }
|
||||
test.istrue(criteria.matches(crit, { system="windows" }))
|
||||
crit = criteria.new { "system:arch or files:core*" }
|
||||
test.istrue(criteria.matches(crit, { system="arch" }))
|
||||
end
|
||||
|
||||
function suite.matches_fails_onMixedPrefixes_firstTermMatched_fileContext()
|
||||
crit = criteria.new { "system:windows or files:core*" }
|
||||
test.isfalse(criteria.matches(crit, { system="windows", files="hello.cpp" }))
|
||||
crit = criteria.new { "system:arch or files:core*" }
|
||||
test.isfalse(criteria.matches(crit, { system="arch", files="hello.cpp" }))
|
||||
end
|
||||
|
||||
function suite.matches_passes_onMixedPrefixes_secondTermMatched()
|
||||
crit = criteria.new { "system:windows or files:core*" }
|
||||
crit = criteria.new { "system:arch or files:core*" }
|
||||
test.istrue(criteria.matches(crit, { system="linux", files="coregraphics.cpp" }))
|
||||
end
|
||||
|
||||
function suite.matches_fails_onMixedPrefixes_noTermMatched()
|
||||
crit = criteria.new { "system:windows or files:core*" }
|
||||
crit = criteria.new { "system:arch or files:core*" }
|
||||
test.isfalse(criteria.matches(crit, { system="linux", files="hello.cpp" }))
|
||||
end
|
||||
|
||||
|
@ -136,12 +136,12 @@
|
|||
--
|
||||
|
||||
function suite.matches_passes_onNotOrMatchesFirst()
|
||||
crit = criteria.new { "system:not windows or linux" }
|
||||
test.isfalse(criteria.matches(crit, { system="windows" }))
|
||||
crit = criteria.new { "system:not arch or linux" }
|
||||
test.isfalse(criteria.matches(crit, { system="arch" }))
|
||||
end
|
||||
|
||||
function suite.matches_passes_onNotOrMatchesSecond()
|
||||
crit = criteria.new { "system:windows or not linux" }
|
||||
crit = criteria.new { "system:arch or not linux" }
|
||||
test.isfalse(criteria.matches(crit, { system="linux" }))
|
||||
end
|
||||
|
||||
|
@ -151,7 +151,7 @@
|
|||
--
|
||||
|
||||
function suite.matches_passes_onNoNotMatch()
|
||||
crit = criteria.new { "system:not windows or linux" }
|
||||
crit = criteria.new { "system:not arch or linux" }
|
||||
test.istrue(criteria.matches(crit, { system="macosx" }))
|
||||
end
|
||||
|
||||
|
@ -161,13 +161,13 @@
|
|||
--
|
||||
|
||||
function suite.matches_passes_onFilenameAndMatchingPattern()
|
||||
crit = criteria.new { "files:**.c", "system:windows" }
|
||||
test.istrue(criteria.matches(crit, { system="windows", files="hello.c" }))
|
||||
crit = criteria.new { "files:**.c", "system:arch" }
|
||||
test.istrue(criteria.matches(crit, { system="arch", files="hello.c" }))
|
||||
end
|
||||
|
||||
function suite.matches_fails_onFilenameAndNoMatchingPattern()
|
||||
crit = criteria.new { "system:windows" }
|
||||
test.isfalse(criteria.matches(crit, { system="windows", files="hello.c" }))
|
||||
crit = criteria.new { "system:arch" }
|
||||
test.isfalse(criteria.matches(crit, { system="arch", files="hello.c" }))
|
||||
end
|
||||
|
||||
|
||||
|
@ -178,30 +178,30 @@
|
|||
function suite.createCriteriaWithTable()
|
||||
crit = criteria.new {
|
||||
files = { "**.c" },
|
||||
system = "windows"
|
||||
system = "arch"
|
||||
}
|
||||
test.istrue(criteria.matches(crit, { system="windows", files="hello.c" }))
|
||||
test.istrue(criteria.matches(crit, { system="arch", files="hello.c" }))
|
||||
end
|
||||
|
||||
function suite.createCriteriaWithTable2()
|
||||
crit = criteria.new {
|
||||
system = "not windows"
|
||||
system = "not arch"
|
||||
}
|
||||
test.isfalse(criteria.matches(crit, { system="windows" }))
|
||||
test.isfalse(criteria.matches(crit, { system="arch" }))
|
||||
end
|
||||
|
||||
function suite.createCriteriaWithTable3()
|
||||
crit = criteria.new {
|
||||
system = "not windows or linux"
|
||||
system = "not arch or linux"
|
||||
}
|
||||
test.istrue(criteria.matches(crit, { system="macosx" }))
|
||||
end
|
||||
|
||||
function suite.createCriteriaWithTable4()
|
||||
crit = criteria.new {
|
||||
system = "windows or linux"
|
||||
system = "arch or linux"
|
||||
}
|
||||
test.istrue(criteria.matches(crit, { system="windows" }))
|
||||
test.istrue(criteria.matches(crit, { system="arch" }))
|
||||
end
|
||||
|
||||
|
||||
|
@ -210,13 +210,13 @@
|
|||
--
|
||||
|
||||
function suite.matches_passes_onFilenameMissAndNotModifier()
|
||||
crit = criteria.new { "files:not **.c", "system:windows" }
|
||||
test.istrue(criteria.matches(crit, { system="windows", files="hello.h" }))
|
||||
crit = criteria.new { "files:not **.c", "system:arch" }
|
||||
test.istrue(criteria.matches(crit, { system="arch", files="hello.h" }))
|
||||
end
|
||||
|
||||
function suite.matches_fails_onFilenameHitAndNotModifier()
|
||||
crit = criteria.new { "files:not **.c", "system:windows" }
|
||||
test.isfalse(criteria.matches(crit, { system="windows", files="hello.c" }))
|
||||
crit = criteria.new { "files:not **.c", "system:arch" }
|
||||
test.isfalse(criteria.matches(crit, { system="arch", files="hello.c" }))
|
||||
end
|
||||
|
||||
|
||||
|
@ -268,63 +268,63 @@
|
|||
end
|
||||
|
||||
function suite.fails_onNotMatch_Unprefixed()
|
||||
crit = criteria.new({ "not windows" }, true)
|
||||
test.isfalse(criteria.matches(crit, { "windows" }))
|
||||
crit = criteria.new({ "not arch" }, true)
|
||||
test.isfalse(criteria.matches(crit, { "arch" }))
|
||||
end
|
||||
|
||||
function suite.passes_onNotUnmatched_Unprefixed()
|
||||
crit = criteria.new({ "not windows" }, true)
|
||||
crit = criteria.new({ "not arch" }, true)
|
||||
test.istrue(criteria.matches(crit, { "linux" }))
|
||||
end
|
||||
|
||||
function suite.passes_onFirstOrTermMatched_Unprefixed()
|
||||
crit = criteria.new({ "windows or linux" }, true)
|
||||
test.istrue(criteria.matches(crit, { "windows" }))
|
||||
crit = criteria.new({ "arch or linux" }, true)
|
||||
test.istrue(criteria.matches(crit, { "arch" }))
|
||||
end
|
||||
|
||||
function suite.passes_onSecondOrTermMatched_Unprefixed()
|
||||
crit = criteria.new({ "windows or linux" }, true)
|
||||
crit = criteria.new({ "arch or linux" }, true)
|
||||
test.istrue(criteria.matches(crit, { "linux" }))
|
||||
end
|
||||
|
||||
function suite.passes_onThirdOrTermMatched_Unprefixed()
|
||||
crit = criteria.new({ "windows or linux or vs2005" }, true)
|
||||
crit = criteria.new({ "arch or linux or vs2005" }, true)
|
||||
test.istrue(criteria.matches(crit, { "vs2005" }))
|
||||
end
|
||||
|
||||
function suite.fails_onNoOrTermMatched_Unprefixed()
|
||||
crit = criteria.new({ "windows or linux" }, true)
|
||||
crit = criteria.new({ "arch or linux" }, true)
|
||||
test.isfalse(criteria.matches(crit, { "vs2005" }))
|
||||
end
|
||||
|
||||
function suite.passes_onNotOrMatchesFirst_Unprefixed()
|
||||
crit = criteria.new({ "not windows or linux" }, true)
|
||||
test.isfalse(criteria.matches(crit, { "windows" }))
|
||||
crit = criteria.new({ "not arch or linux" }, true)
|
||||
test.isfalse(criteria.matches(crit, { "arch" }))
|
||||
end
|
||||
|
||||
function suite.passes_onNotOrMatchesSecond_Unprefixed()
|
||||
crit = criteria.new({ "windows or not linux" }, true)
|
||||
crit = criteria.new({ "arch or not linux" }, true)
|
||||
test.isfalse(criteria.matches(crit, { "linux" }))
|
||||
end
|
||||
|
||||
function suite.passes_onNoNotMatch_Unprefixed()
|
||||
crit = criteria.new({ "not windows or linux" }, true)
|
||||
crit = criteria.new({ "not arch or linux" }, true)
|
||||
test.istrue(criteria.matches(crit, { "macosx" }))
|
||||
end
|
||||
|
||||
function suite.passes_onFilenameAndMatchingPattern_Unprefixed()
|
||||
crit = criteria.new({ "**.c", "windows" }, true)
|
||||
test.istrue(criteria.matches(crit, { system="windows", files="hello.c" }))
|
||||
crit = criteria.new({ "**.c", "arch" }, true)
|
||||
test.istrue(criteria.matches(crit, { system="arch", files="hello.c" }))
|
||||
end
|
||||
|
||||
function suite.fails_onFilenameAndNoMatchingPattern_Unprefixed()
|
||||
crit = criteria.new({ "windows" }, true)
|
||||
test.isfalse(criteria.matches(crit, { system="windows", files="hello.c" }))
|
||||
crit = criteria.new({ "arch" }, true)
|
||||
test.isfalse(criteria.matches(crit, { system="arch", files="hello.c" }))
|
||||
end
|
||||
|
||||
function suite.fails_onFilenameAndNotModifier_Unprefixed()
|
||||
crit = criteria.new({ "not linux" }, true)
|
||||
test.isfalse(criteria.matches(crit, { system="windows", files="hello.c" }))
|
||||
test.isfalse(criteria.matches(crit, { system="arch", files="hello.c" }))
|
||||
end
|
||||
|
||||
function suite.matches_passes_termMatchesList_Unprefixed()
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
if os.istarget("macosx") then
|
||||
-- macOS no longer stores system libraries on filesystem; see
|
||||
-- https://developer.apple.com/documentation/macos-release-notes/macos-big-sur-11_0_1-release-notes
|
||||
elseif os.istarget("windows") then
|
||||
elseif os.istarget("arch") then
|
||||
test.istrue(os.findlib("user32"))
|
||||
elseif os.istarget("haiku") then
|
||||
test.istrue(os.findlib("root"))
|
||||
|
@ -40,7 +40,7 @@
|
|||
end
|
||||
|
||||
function suite.findheader_stdheaders()
|
||||
if not os.istarget("windows") and not os.istarget("macosx") then
|
||||
if not os.istarget("arch") and not os.istarget("macosx") then
|
||||
test.istrue(os.findheader("stdlib.h"))
|
||||
end
|
||||
end
|
||||
|
@ -230,89 +230,89 @@
|
|||
end
|
||||
|
||||
--
|
||||
-- os.translateCommand() windows COPY tests
|
||||
-- os.translateCommand() arch COPY tests
|
||||
--
|
||||
|
||||
function suite.translateCommand_windowsCopyNoDst()
|
||||
test.isequal('IF EXIST a\\ (xcopy /Q /E /Y /I a > nul) ELSE (xcopy /Q /Y /I a > nul)', os.translateCommands('{COPY} a', "windows"))
|
||||
function suite.translateCommand_archCopyNoDst()
|
||||
test.isequal('IF EXIST a\\ (xcopy /Q /E /Y /I a > nul) ELSE (xcopy /Q /Y /I a > nul)', os.translateCommands('{COPY} a', "arch"))
|
||||
end
|
||||
|
||||
function suite.translateCommand_windowsCopyNoDst_ExtraSpace()
|
||||
test.isequal('IF EXIST a\\ (xcopy /Q /E /Y /I a > nul) ELSE (xcopy /Q /Y /I a > nul)', os.translateCommands('{COPY} a ', "windows"))
|
||||
function suite.translateCommand_archCopyNoDst_ExtraSpace()
|
||||
test.isequal('IF EXIST a\\ (xcopy /Q /E /Y /I a > nul) ELSE (xcopy /Q /Y /I a > nul)', os.translateCommands('{COPY} a ', "arch"))
|
||||
end
|
||||
|
||||
function suite.translateCommand_windowsCopyNoQuotes()
|
||||
test.isequal('IF EXIST a\\ (xcopy /Q /E /Y /I a b > nul) ELSE (xcopy /Q /Y /I a b > nul)', os.translateCommands('{COPY} a b', "windows"))
|
||||
function suite.translateCommand_archCopyNoQuotes()
|
||||
test.isequal('IF EXIST a\\ (xcopy /Q /E /Y /I a b > nul) ELSE (xcopy /Q /Y /I a b > nul)', os.translateCommands('{COPY} a b', "arch"))
|
||||
end
|
||||
|
||||
function suite.translateCommand_windowsCopyNoQuotes_ExtraSpace()
|
||||
test.isequal('IF EXIST a\\ (xcopy /Q /E /Y /I a b > nul) ELSE (xcopy /Q /Y /I a b > nul)', os.translateCommands('{COPY} a b ', "windows"))
|
||||
function suite.translateCommand_archCopyNoQuotes_ExtraSpace()
|
||||
test.isequal('IF EXIST a\\ (xcopy /Q /E /Y /I a b > nul) ELSE (xcopy /Q /Y /I a b > nul)', os.translateCommands('{COPY} a b ', "arch"))
|
||||
end
|
||||
|
||||
function suite.translateCommand_windowsCopyQuotes()
|
||||
test.isequal('IF EXIST "a a"\\ (xcopy /Q /E /Y /I "a a" "b" > nul) ELSE (xcopy /Q /Y /I "a a" "b" > nul)', os.translateCommands('{COPY} "a a" "b"', "windows"))
|
||||
function suite.translateCommand_archCopyQuotes()
|
||||
test.isequal('IF EXIST "a a"\\ (xcopy /Q /E /Y /I "a a" "b" > nul) ELSE (xcopy /Q /Y /I "a a" "b" > nul)', os.translateCommands('{COPY} "a a" "b"', "arch"))
|
||||
end
|
||||
|
||||
function suite.translateCommand_windowsCopyQuotes_ExtraSpace()
|
||||
test.isequal('IF EXIST "a a"\\ (xcopy /Q /E /Y /I "a a" "b" > nul) ELSE (xcopy /Q /Y /I "a a" "b" > nul)', os.translateCommands('{COPY} "a a" "b" ', "windows"))
|
||||
function suite.translateCommand_archCopyQuotes_ExtraSpace()
|
||||
test.isequal('IF EXIST "a a"\\ (xcopy /Q /E /Y /I "a a" "b" > nul) ELSE (xcopy /Q /Y /I "a a" "b" > nul)', os.translateCommands('{COPY} "a a" "b" ', "arch"))
|
||||
end
|
||||
|
||||
function suite.translateCommand_windowsCopyNoQuotesDst()
|
||||
test.isequal('IF EXIST "a a"\\ (xcopy /Q /E /Y /I "a a" b > nul) ELSE (xcopy /Q /Y /I "a a" b > nul)', os.translateCommands('{COPY} "a a" b', "windows"))
|
||||
function suite.translateCommand_archCopyNoQuotesDst()
|
||||
test.isequal('IF EXIST "a a"\\ (xcopy /Q /E /Y /I "a a" b > nul) ELSE (xcopy /Q /Y /I "a a" b > nul)', os.translateCommands('{COPY} "a a" b', "arch"))
|
||||
end
|
||||
|
||||
function suite.translateCommand_windowsCopyNoQuotesDst_ExtraSpace()
|
||||
test.isequal('IF EXIST "a a"\\ (xcopy /Q /E /Y /I "a a" b > nul) ELSE (xcopy /Q /Y /I "a a" b > nul)', os.translateCommands('{COPY} "a a" b ', "windows"))
|
||||
function suite.translateCommand_archCopyNoQuotesDst_ExtraSpace()
|
||||
test.isequal('IF EXIST "a a"\\ (xcopy /Q /E /Y /I "a a" b > nul) ELSE (xcopy /Q /Y /I "a a" b > nul)', os.translateCommands('{COPY} "a a" b ', "arch"))
|
||||
end
|
||||
|
||||
function suite.translateCommand_windowsCopyNoQuotesSrc()
|
||||
test.isequal('IF EXIST a\\ (xcopy /Q /E /Y /I a "b" > nul) ELSE (xcopy /Q /Y /I a "b" > nul)', os.translateCommands('{COPY} a "b"', "windows"))
|
||||
function suite.translateCommand_archCopyNoQuotesSrc()
|
||||
test.isequal('IF EXIST a\\ (xcopy /Q /E /Y /I a "b" > nul) ELSE (xcopy /Q /Y /I a "b" > nul)', os.translateCommands('{COPY} a "b"', "arch"))
|
||||
end
|
||||
|
||||
function suite.translateCommand_windowsCopyNoQuotesSrc_ExtraSpace()
|
||||
test.isequal('IF EXIST a\\ (xcopy /Q /E /Y /I a "b" > nul) ELSE (xcopy /Q /Y /I a "b" > nul)', os.translateCommands('{COPY} a "b" ', "windows"))
|
||||
function suite.translateCommand_archCopyNoQuotesSrc_ExtraSpace()
|
||||
test.isequal('IF EXIST a\\ (xcopy /Q /E /Y /I a "b" > nul) ELSE (xcopy /Q /Y /I a "b" > nul)', os.translateCommands('{COPY} a "b" ', "arch"))
|
||||
end
|
||||
|
||||
--
|
||||
-- os.getWindowsRegistry windows tests
|
||||
-- os.getWindowsRegistry arch tests
|
||||
--
|
||||
function suite.getreg_nonExistentValue()
|
||||
if os.ishost("windows") then
|
||||
if os.ishost("arch") then
|
||||
local x = os.getWindowsRegistry("HKCU:Should\\Not\\Exist\\At\\All")
|
||||
test.isequal(nil, x)
|
||||
end
|
||||
end
|
||||
|
||||
function suite.getreg_nonExistentDefaultValue()
|
||||
if os.ishost("windows") then
|
||||
if os.ishost("arch") then
|
||||
local x = os.getWindowsRegistry("HKCU:Should\\Not\\Exist\\At\\All\\")
|
||||
test.isequal(nil, x)
|
||||
end
|
||||
end
|
||||
|
||||
function suite.getreg_noSeparators()
|
||||
if os.ishost("windows") then
|
||||
if os.ishost("arch") then
|
||||
local x = os.getWindowsRegistry("HKCU:ShouldNotExistAtAll")
|
||||
test.isequal(nil, x)
|
||||
end
|
||||
end
|
||||
|
||||
function suite.getreg_namedValue()
|
||||
if os.ishost("windows") then
|
||||
if os.ishost("arch") then
|
||||
local x = os.getWindowsRegistry("HKCU:Environment\\TEMP")
|
||||
test.istrue(x ~= nil)
|
||||
end
|
||||
end
|
||||
|
||||
function suite.getreg_namedValueOptSeparator()
|
||||
if os.ishost("windows") then
|
||||
if os.ishost("arch") then
|
||||
local x = os.getWindowsRegistry("HKCU:\\Environment\\TEMP")
|
||||
test.istrue(x ~= nil)
|
||||
end
|
||||
end
|
||||
|
||||
function suite.getreg_defaultValue()
|
||||
if os.ishost("windows") then
|
||||
if os.ishost("arch") then
|
||||
local x = os.getWindowsRegistry("HKLM:SYSTEM\\CurrentControlSet\\Control\\SafeBoot\\Minimal\\AppInfo\\")
|
||||
test.isequal("Service", x)
|
||||
end
|
||||
|
@ -320,45 +320,45 @@
|
|||
|
||||
|
||||
--
|
||||
-- os.listWindowsRegistry windows tests
|
||||
-- os.listWindowsRegistry arch tests
|
||||
--
|
||||
function suite.listreg_nonExistentKey()
|
||||
if os.ishost("windows") then
|
||||
if os.ishost("arch") then
|
||||
local x = os.listWindowsRegistry("HKCU:Should\\Not\\Exist\\At\\All")
|
||||
test.isequal(nil, x)
|
||||
end
|
||||
end
|
||||
|
||||
function suite.listreg_nonExistentKeyTrailingBackslash()
|
||||
if os.ishost("windows") then
|
||||
if os.ishost("arch") then
|
||||
local x = os.listWindowsRegistry("HKCU:Should\\Not\\Exist\\At\\All\\")
|
||||
test.isequal(nil, x)
|
||||
end
|
||||
end
|
||||
|
||||
function suite.listreg_noSeparators()
|
||||
if os.ishost("windows") then
|
||||
if os.ishost("arch") then
|
||||
local x = os.listWindowsRegistry("HKCU:ShouldNotExistAtAll")
|
||||
test.isequal(nil, x)
|
||||
end
|
||||
end
|
||||
|
||||
function suite.listreg_noSeparatorExistingPath()
|
||||
if os.ishost("windows") then
|
||||
if os.ishost("arch") then
|
||||
local x = os.listWindowsRegistry("HKCU:Environment")
|
||||
test.istrue(x ~= nil and x["TEMP"] ~= nil)
|
||||
end
|
||||
end
|
||||
|
||||
function suite.listreg_optSeparators()
|
||||
if os.ishost("windows") then
|
||||
if os.ishost("arch") then
|
||||
local x = os.listWindowsRegistry("HKCU:\\Environment\\")
|
||||
test.istrue(x ~= nil and x["TEMP"] ~= nil)
|
||||
end
|
||||
end
|
||||
|
||||
function suite.listreg_keyDefaultValueAndStringValueFormat()
|
||||
if os.ishost("windows") then
|
||||
if os.ishost("arch") then
|
||||
local x = os.listWindowsRegistry("HKLM:SYSTEM\\CurrentControlSet\\Control\\SafeBoot\\Minimal\\AppInfo")
|
||||
test.isequal(x[""]["value"], "Service")
|
||||
test.isequal(x[""]["type"], "REG_SZ")
|
||||
|
@ -366,7 +366,7 @@
|
|||
end
|
||||
|
||||
function suite.listreg_numericValueFormat()
|
||||
if os.ishost("windows") then
|
||||
if os.ishost("arch") then
|
||||
local x = os.listWindowsRegistry("HKCU:Console")
|
||||
test.isequal(type(x["FullScreen"]["value"]), "number")
|
||||
test.isequal(x["FullScreen"]["type"], "REG_DWORD")
|
||||
|
@ -374,7 +374,7 @@
|
|||
end
|
||||
|
||||
function suite.listreg_subkeyFormat()
|
||||
if os.ishost("windows") then
|
||||
if os.ishost("arch") then
|
||||
local x = os.listWindowsRegistry("HKLM:")
|
||||
test.isequal(type(x["SOFTWARE"]), "table")
|
||||
test.isequal(next(x["SOFTWARE"]), nil)
|
||||
|
@ -421,7 +421,7 @@
|
|||
|
||||
local tmpfile = function()
|
||||
local p = tmpname()
|
||||
if os.ishost("windows") then
|
||||
if os.ishost("arch") then
|
||||
os.execute("type nul >" .. p)
|
||||
else
|
||||
os.execute("touch " .. p)
|
||||
|
|
|
@ -623,7 +623,7 @@
|
|||
end
|
||||
|
||||
function suite.translate_ReturnsTargetOSSeparator_Windows()
|
||||
_OPTIONS["os"] = "windows"
|
||||
_OPTIONS["os"] = "arch"
|
||||
test.isequal("dir\\dir\\file", path.translate("dir/dir\\file"))
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue