Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
varnish-cache
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
varnishcache
varnish-cache
Commits
7179b965
Commit
7179b965
authored
Apr 02, 2017
by
Poul-Henning Kamp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Tempt fate and try to make getopt() error strings part of our tests,
in order to have less ambiguous error messages.
parent
b7588942
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
6 deletions
+6
-6
mgt_main.c
bin/varnishd/mgt/mgt_main.c
+2
-5
a00009.vtc
bin/varnishtest/tests/a00009.vtc
+4
-1
No files found.
bin/varnishd/mgt/mgt_main.c
View file @
7179b965
...
...
@@ -530,12 +530,9 @@ main(int argc, char * const *argv)
do
{
switch
(
o
)
{
case
'?'
:
if
(
optopt
==
'?'
)
{
if
(
optopt
==
'?'
)
usage
();
exit
(
1
);
}
ARGV_ERR
(
"Option '%c' unknown.
\n
"
,
optopt
);
exit
(
2
);
case
'V'
:
case
'x'
:
ARGV_ERR
(
"-%c must be the first argument
\n
"
,
o
);
...
...
bin/varnishtest/tests/a00009.vtc
View file @
7179b965
...
...
@@ -11,7 +11,10 @@ shell -err -expect {-V must be the first argument} "varnishd -d -V foo "
shell -err -expect {Too many arguments for -x} "varnishd -x foo bar"
shell -err -expect {Invalid -x argument} "varnishd -x foo "
shell -err -expect {Option 'A' unknown.} "varnishd -A "
# This one is tricky, the getopt message on stderr is not standardized.
shell -err -expect {option --} "varnishd -A "
shell -err -expect {Usage: varnishd [options]} "varnishd -? "
shell -err -expect {Too many arguments} "varnishd foo "
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment