[CLI parser] mtouch arguments are not escaped properly
Some parameters may have spaces and specific symbols. For example, we have a device named "Igor’s iPad". The tests are not launched properly on it.
Steps :
-
Rename your device to "Igor’s iPad"
-
Install a test app on it
-
Try launching it with TouchServer
mono Touch.Server.exe \
--verbose \
--autoexit \
--port=16393 \
--launchdev="your.app.bundle" \
--devname="Igor’s iPad" \
--logfile=UnitTestReport-Device-iOS8.xml
Actual result : The script hangs because of an unescaped input (see the log below)
Touch.Unit Simple Server Copyright 2011, Xamarin Inc. All rights reserved. User input for endpoint: 0.0.0.0:16393 Touch.Unit Simple Server listening on: 0.0.0.0:16393 [Command] mtouch --launchdev net.sitecore.MobileSDKUnitTestiOS --devname=Igor’s iPad -argument=-connection-mode -argument=none -argument=-app-arg:-autostart -argument=-app-arg:-autoexit -argument=-app-arg:-enablenetwork -argument=-app-arg:-hostport:16393 -argument=-app-arg:-hostname:10.38.10.236 ^Z
Expected Result The tests are launched on the device