diff options
author | liamDevine <none@none> | 2011-08-22 13:14:42 +0400 |
---|---|---|
committer | liamDevine <none@none> | 2011-08-22 13:14:42 +0400 |
commit | 0c759197a2fb5e80ec3870afc42f54c2d745e99a (patch) | |
tree | 117027e8d999d770996500e7e699c637f9d8db51 /tests | |
parent | 5f46e2c576cb53460d11019b06df46d9f51f0ade (diff) |
Adds environmentargs for vs10 and flags which define specifics for them.
Flags
EnvironmentArgsDontMerge - Default is to merge these Environment arguments specified with the current environment args.
EnvironmentArgsInherit - Inherits from parent or project defaults.
Diffstat (limited to 'tests')
-rwxr-xr-x | tests/actions/vstudio/vc2010/test_debugdir.lua | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/tests/actions/vstudio/vc2010/test_debugdir.lua b/tests/actions/vstudio/vc2010/test_debugdir.lua index 6aff768..82d3d14 100755 --- a/tests/actions/vstudio/vc2010/test_debugdir.lua +++ b/tests/actions/vstudio/vc2010/test_debugdir.lua @@ -53,3 +53,44 @@ <LocalDebuggerCommandArguments>arg1 arg2</LocalDebuggerCommandArguments>
]]
end
+
+ + + T.vs2010_env_args = { } + local vs10_env_args = T.vs2010_env_args + local env_args = premake.vstudio.vc2010.environmentargs + + function vs10_env_args.environmentArgs_notSet_bufferDoesNotContainLocalDebuggerEnvironment() + env_args( {flags={}} ) + test.string_does_not_contain(io.endcapture(),'<LocalDebuggerEnvironment>') + end + + function vs10_env_args.environmentArgs_set_bufferContainsLocalDebuggerEnvironment() + env_args({flags={},environmentargs ={'key=value'}} ) + test.string_contains(io.endcapture(),'<LocalDebuggerEnvironment>') + end + + function vs10_env_args.environmentArgs_oneArgformat_openTagKeyValuePairCloseTag() + env_args({flags={},environmentargs ={'key=value'}} ) + test.string_contains(io.endcapture(),'<LocalDebuggerEnvironment>key=value</LocalDebuggerEnvironment>') + end + + function vs10_env_args.environmentArgs_twoArgformat_openTagKeyValueNewLineSecondPairCloseTag() + env_args({flags={},environmentargs ={'key=value','foo=bar'}} ) + test.string_contains(io.endcapture(),'<LocalDebuggerEnvironment>key=value\nfoo=bar</LocalDebuggerEnvironment>') + end + + function vs10_env_args.environmentArgs_withOutFlagEnvironmentArgsInherit_doesNotContainLocalDebuggerEnvironmentArg() + env_args({flags={},environmentargs ={'key=value'}} ) + test.string_does_not_contain(io.endcapture(),'%$%(LocalDebuggerEnvironment%)') + end + + function vs10_env_args.environmentArgs_withFlagEnvironmentArgsInherit_endsWithNewLineLocalDebuggerEnvironmentFollowedByClosedTag() + env_args({flags={EnvironmentArgsInherit=1},environmentargs ={'key=value'}} ) + test.string_contains(io.endcapture(),'\n%$%(LocalDebuggerEnvironment%)</LocalDebuggerEnvironment>') + end + + function vs10_env_args.environmentArgs_withEnvironmentArgsDontMerge_localDebuggerMergeEnvironmentSetToFalse() + env_args({flags={EnvironmentArgsDontMerge=1},environmentargs ={'key=value'}} ) + test.string_contains(io.endcapture(),'<LocalDebuggerMergeEnvironment>false</LocalDebuggerMergeEnvironment>') + end |