config->insecure_ok = toggle;
break;
case 'K': /* parse config file */
- if(parseconfig(nextarg, global))
- warnf(global, "error trying read config from the '%s' file\n",
- nextarg);
+ if(parseconfig(nextarg, global)) {
+ errorf(global, "cannot read config from '%s'\n", nextarg);
+ return PARAM_READ_ERROR;
+ }
break;
case 'l':
config->dirlistonly = toggle; /* only list the names of the FTP dir */
test392 test393 test394 test395 test396 test397 test398 \
\
test400 test401 test402 test403 test404 test405 test406 test407 test408 \
-test409 test410 \
+test409 test410 test411 \
\
test430 test431 test432 test433 test434 test435 test436 \
\
--- /dev/null
+<testcase>
+<info>
+<keywords>
+-K
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+none
+</server>
+ <name>
+-K with missing file causes error
+ </name>
+ <command>
+-K log/missing http://localhost
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<stderr mode="text">
+curl: cannot read config from 'log/missing'
+curl: option -K: error encountered when reading a file
+%if manual
+curl: try 'curl --help' or 'curl --manual' for more information
+%else
+curl: try 'curl --help' for more information
+%endif
+</stderr>
+<errorcode>
+26
+</errorcode>
+</verify>
+</testcase>