diff options
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 |