From 7bd8e929e4a0440a8ad3a322e1c76e7c78d781fe Mon Sep 17 00:00:00 2001 From: Rolf Bjarne Kvinge Date: Thu, 16 Jul 2020 17:45:21 +0200 Subject: [PATCH] [TouchOptions] Fix a few issues related to command-line parsing. Parse command line options like we parse the corresponding environment variables (case insensitively) Also fix actually passing values to a few arguments. --- NUnitLite/TouchRunner/TouchOptions.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/NUnitLite/TouchRunner/TouchOptions.cs b/NUnitLite/TouchRunner/TouchOptions.cs index 2943606..e1418c5 100644 --- a/NUnitLite/TouchRunner/TouchOptions.cs +++ b/NUnitLite/TouchRunner/TouchOptions.cs @@ -96,9 +96,9 @@ public TouchOptions () { "use-tcp-tunnel", "Use a TCP tunnel to connect to the host.", v => UseTcpTunnel = true }, { "enablenetwork", "Enable the network reporter.", v => EnableNetwork = true }, { "transport=", "Select transport method. Either TCP (default), HTTP or FILE.", v => Transport = v }, - { "enablexml", "Enable the xml reported.", v => EnableXml = false }, - { "xmlmode", "The xml mode.", v => XmlMode = (XmlMode) Enum.Parse (typeof (XmlMode), v, false) }, - { "xmlversion", "The xml version.", v => XmlVersion = (XmlVersion) Enum.Parse (typeof (XmlVersion), v, false) }, + { "enablexml:", "Enable the xml reported.", v => EnableXml = string.IsNullOrEmpty (v) ? true : bool.Parse (v) }, + { "xmlmode=", "The xml mode.", v => XmlMode = (XmlMode) Enum.Parse (typeof (XmlMode), v, true) }, + { "xmlversion=", "The xml version.", v => XmlVersion = (XmlVersion) Enum.Parse (typeof (XmlVersion), v, true) }, { "logfile=", "A path where output will be saved.", v => LogFile = v }, };