Merge lp:~wajahat-abbassi/drizzle/trunk-bug-935951 into lp:drizzle

Proposed by Mark Atwood
Status: Merged
Approved by: Brian Aker
Approved revision: 2538
Merged at revision: 2542
Proposed branch: lp:~wajahat-abbassi/drizzle/trunk-bug-935951
Merge into: lp:drizzle
Diff against target: 44 lines (+8/-3)
2 files modified
drizzled/drizzled.cc (+1/-1)
unittests/option_context.cc (+7/-2)
To merge this branch: bzr merge lp:~wajahat-abbassi/drizzle/trunk-bug-935951
Reviewer Review Type Date Requested Status
Henrik Ingo Pending
Review via email: mp+101997@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Brian Aker (brianaker) wrote :

I think this should go to 7.1, as well as trunk.

Revision history for this message
Henrik Ingo (hingo) wrote :

I agree wrt 7.1 & tunk.

Revision history for this message
Wajahat Abbassi (wajahat-abbassi) wrote :

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'drizzled/drizzled.cc'
2--- drizzled/drizzled.cc 2012-03-24 14:27:27 +0000
3+++ drizzled/drizzled.cc 2012-04-14 01:20:25 +0000
4@@ -1336,7 +1336,7 @@
5 unireg_exit();
6 }
7
8- if (vm.count("no-defaults"))
9+ if (!vm["no-defaults"].as<bool>())
10 {
11 fs::path system_config_file_drizzle(system_config_dir);
12 system_config_file_drizzle /= "drizzled.cnf";
13
14=== modified file 'unittests/option_context.cc'
15--- unittests/option_context.cc 2011-02-17 00:14:13 +0000
16+++ unittests/option_context.cc 2012-04-14 01:20:25 +0000
17@@ -36,14 +36,17 @@
18 {
19 const std::string module_name("test");
20 po::options_description command_line_options("Test prefix injection");
21- module::option_context ctx(module_name, command_line_options.add_options());
22+ module::option_context ctx(module_name, command_line_options.add_options()(
23+ "command-option",
24+ po::value<bool>()->default_value(false)->zero_tokens(),
25+ "Test command line option"));
26
27 ctx("option", po::value<std::string>(), "Test option name prefix injection");
28
29 po::variables_map vm;
30
31 const char *options[]= {
32- "test", "--test.option=foo"
33+ "test", "--test.option=foo",
34 };
35
36 // Disable allow_guessing
37@@ -56,5 +59,7 @@
38 BOOST_REQUIRE_EQUAL(0, vm.count("option"));
39 BOOST_REQUIRE_EQUAL(1, vm.count("test.option"));
40 BOOST_REQUIRE_EQUAL(0, vm["test.option"].as<std::string>().compare("foo"));
41+ BOOST_REQUIRE_EQUAL(1, vm.count("command-option"));
42+ BOOST_REQUIRE_EQUAL(0, vm["command-option"].as<bool>());
43 }
44 BOOST_AUTO_TEST_SUITE_END()

Subscribers

People subscribed via source and target branches

to all changes: