curl-library
[PATCH 7/8] tests: use single quotes for some tests
From: Peter Wu <peter_at_lekensteyn.nl>
Date: Thu, 6 Nov 2014 01:32:47 +0100
Date: Thu, 6 Nov 2014 01:32:47 +0100
This prepares for a future patch where commands are not executed by a
shell anymore, but by perl. In the future, Text::ParseWords will be used
to convert a command to an array.
According to 2.2.3 Double-Quotes, chapter Shell Command Language of
The Base Specifications Issue 6 (IEEE Std 1003.1 2004), double quotes
should not touch characters other than
$ ` " \ <newline>
Unfortunately, perls Text::ParseWords does not handle this correctly,
removing the slash for everything else. Avoid this incompatibility by
using single quotes instead.
Signed-off-by: Peter Wu <peter_at_lekensteyn.nl>
--- tests/data/test1089 | 2 +- tests/data/test1090 | 2 +- tests/data/test15 | 2 +- tests/data/test192 | 2 +- tests/data/test193 | 2 +- tests/data/test214 | 2 +- tests/data/test217 | 2 +- tests/data/test57 | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/tests/data/test1089 b/tests/data/test1089 index d2a18a2..5f01988 100644 --- a/tests/data/test1089 +++ b/tests/data/test1089 @@ -43,7 +43,7 @@ http HTTP GET --write-out with redirected fetch </name> <command> -http://%HOSTIP:%HTTPPORT/1089 -w "%{num_connects}\n%{num_redirects}\n%{size_download}\n%{url_effective}\n%{content_type}\n%{response_code}\n" -L +http://%HOSTIP:%HTTPPORT/1089 -w '%{num_connects}\n%{num_redirects}\n%{size_download}\n%{url_effective}\n%{content_type}\n%{response_code}\n' -L </command> </client> diff --git a/tests/data/test1090 b/tests/data/test1090 index 3304f91..491dfc6 100644 --- a/tests/data/test1090 +++ b/tests/data/test1090 @@ -50,7 +50,7 @@ http HTTP GET --write-out with redirected fetch and chunked reply </name> <command> -http://%HOSTIP:%HTTPPORT/1090 -w "%{num_connects}\n%{num_redirects}\n%{size_download}\n%{url_effective}\n%{content_type}\n%{response_code}\n" -L +http://%HOSTIP:%HTTPPORT/1090 -w '%{num_connects}\n%{num_redirects}\n%{size_download}\n%{url_effective}\n%{content_type}\n%{response_code}\n' -L </command> </client> diff --git a/tests/data/test15 b/tests/data/test15 index 3b1fa43..430ae0b 100644 --- a/tests/data/test15 +++ b/tests/data/test15 @@ -28,7 +28,7 @@ http --write-out test </name> <command> -http://%HOSTIP:%HTTPPORT/want/15 --write-out "%{url_effective} %{http_code} %{size_download}\n" +http://%HOSTIP:%HTTPPORT/want/15 --write-out '%{url_effective} %{http_code} %{size_download}\n' </command> </client> diff --git a/tests/data/test192 b/tests/data/test192 index 42cebc0..d0cb800 100644 --- a/tests/data/test192 +++ b/tests/data/test192 @@ -29,7 +29,7 @@ http HTTP GET -w num_connects with one simple connect </name> <command> -http://%HOSTIP:%HTTPPORT/192 -w "%{num_connects}\n" +http://%HOSTIP:%HTTPPORT/192 -w '%{num_connects}\n' </command> </client> diff --git a/tests/data/test193 b/tests/data/test193 index c5425bb..420caad 100644 --- a/tests/data/test193 +++ b/tests/data/test193 @@ -41,7 +41,7 @@ http HTTP GET -w num_connects with redirected fetch (2 connects) </name> <command> -http://%HOSTIP:%HTTPPORT/193 -w "%{num_connects}\n" -L +http://%HOSTIP:%HTTPPORT/193 -w '%{num_connects}\n' -L </command> </client> diff --git a/tests/data/test214 b/tests/data/test214 index a9b8fcd..35f97bc 100644 --- a/tests/data/test214 +++ b/tests/data/test214 @@ -29,7 +29,7 @@ http HTTP URL with escaped { and } </name> <command> -"http://%HOSTIP:%HTTPPORT/\{\}\/214" +'http://%HOSTIP:%HTTPPORT/\{\}\/214' </command> </client> diff --git a/tests/data/test217 b/tests/data/test217 index f10df56..c5b4286 100644 --- a/tests/data/test217 +++ b/tests/data/test217 @@ -32,7 +32,7 @@ http HTTP proxy CONNECT to proxy returning 405 </name> <command> -http://test.remote.example.com.217:%HTTPPORT/path/2170002 --proxy http://%HOSTIP:%HTTPPORT --proxytunnel -w "%{http_code} %{http_connect}\n" +http://test.remote.example.com.217:%HTTPPORT/path/2170002 --proxy http://%HOSTIP:%HTTPPORT --proxytunnel -w '%{http_code} %{http_connect}\n' </command> </client> diff --git a/tests/data/test57 b/tests/data/test57 index 0724eac..573849b 100644 --- a/tests/data/test57 +++ b/tests/data/test57 @@ -26,7 +26,7 @@ http HTTP content-type with spaces in </name> <command> --w "%{content_type}\n" http://%HOSTIP:%HTTPPORT/57 -o log/out57 +-w '%{content_type}\n' http://%HOSTIP:%HTTPPORT/57 -o log/out57 </command> </client> -- 2.1.2 ------------------------------------------------------------------- List admin: http://cool.haxx.se/list/listinfo/curl-library Etiquette: http://curl.haxx.se/mail/etiquette.htmlReceived on 2014-11-06