Fix test failure with --enable-libaria2

pull/257/head release-1.18.6
Tatsuhiro Tsujikawa 2014-07-14 00:06:32 +09:00
parent 4b6f4040ac
commit 04caefa406
2 changed files with 7 additions and 3 deletions

View File

@ -186,11 +186,15 @@ error_code::Value option_processing(Option& op, bool standalone,
bool noConf = false; bool noConf = false;
std::string ucfname; std::string ucfname;
std::stringstream cmdstream; std::stringstream cmdstream;
oparser->parseArg(cmdstream, uris, argc, argv);
{ {
// first evaluate --no-conf and --conf-path options. // first evaluate --no-conf and --conf-path options.
Option op; Option op;
oparser->parse(op, cmdstream); if(argc == 0) {
oparser->parse(op, options);
} else {
oparser->parseArg(cmdstream, uris, argc, argv);
oparser->parse(op, cmdstream);
}
noConf = op.getAsBool(PREF_NO_CONF); noConf = op.getAsBool(PREF_NO_CONF);
ucfname = op.get(PREF_CONF_PATH); ucfname = op.get(PREF_CONF_PATH);
if(standalone) { if(standalone) {

View File

@ -32,7 +32,7 @@ public:
void setUp() void setUp()
{ {
SessionConfig config; SessionConfig config;
KeyVals options; KeyVals options = {{"no-conf", "true"}};
session_ = sessionNew(options, config); session_ = sessionNew(options, config);
} }