Skip to content

Commit

Permalink
Fix test failure with --enable-libaria2
Browse files Browse the repository at this point in the history
  • Loading branch information
tatsuhiro-t committed Jul 13, 2014
1 parent 4b6f404 commit 04caefa
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
8 changes: 6 additions & 2 deletions src/option_processing.cc
Original file line number Diff line number Diff line change
Expand Up @@ -186,11 +186,15 @@ error_code::Value option_processing(Option& op, bool standalone,
bool noConf = false;
std::string ucfname;
std::stringstream cmdstream;
oparser->parseArg(cmdstream, uris, argc, argv);
{
// first evaluate --no-conf and --conf-path options.
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);
ucfname = op.get(PREF_CONF_PATH);
if(standalone) {
Expand Down
2 changes: 1 addition & 1 deletion test/Aria2ApiTest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class Aria2ApiTest:public CppUnit::TestFixture {
void setUp()
{
SessionConfig config;
KeyVals options;
KeyVals options = {{"no-conf", "true"}};
session_ = sessionNew(options, config);
}

Expand Down

0 comments on commit 04caefa

Please sign in to comment.