urlglob: improved error messages and column number on bad use

Introduce a convenience macro and keep of the column better so that it
can point out the offending column better.

Updated test 75 accordingly.
This commit is contained in:
Daniel Stenberg 2013-09-06 23:27:47 +02:00
parent d6cda9e8ab
commit 9fa42beddc
3 changed files with 68 additions and 84 deletions

View file

@ -24,7 +24,7 @@ http
HTTP, urlglob retrieval with bad range
</name>
<command option="no-output">
"http://%HOSTIP:%HTTPPORT/[2-1]" -o "log/weee#1.dump" --stderr -
"http://a-site-never-accessed.example.org/[2-1]" -o "log/weee#1.dump" --stderr -
</command>
# The error message on stdout implicitly depends on the length of the
# URL, so refuse to run if the length is unexpected.
@ -43,7 +43,7 @@ perl %SRCDIR/libtest/test75.pl http://%HOSTIP:%HTTPPORT/ 22
3
</errorcode>
<stdout mode="text">
curl: (3) [globbing] error: bad range specification after pos 24
curl: (3) [globbing] bad range in column 47
</stdout>
</verify>
</testcase>