Update of /cvsroot/boost/boost/libs/program_options/test
In directory
sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv13215/libs/program_options/test
Modified Files:
parsers_test.cpp
Log Message:
Implement support for unregistered options in config files. Closes #687.
Index: parsers_test.cpp
===================================================================
RCS file: /cvsroot/boost/boost/libs/program_options/test/parsers_test.cpp,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -d -r1.16 -r1.17
--- parsers_test.cpp 28 Jun 2007 07:09:38 -0000 1.16
+++ parsers_test.cpp 11 Jul 2007 19:39:06 -0000 1.17
@@ -18,6 +18,7 @@
#include <boost/test/test_tools.hpp>
#include <sstream>
+#include <iostream>
using namespace std;
#if defined(__sun)
@@ -242,6 +243,20 @@
vm);
BOOST_CHECK_EQUAL(vm.size(), 0u);
+
+
+ const char content1[] =
+ "gv1 = 0\n"
+ "[m1]\n"
+ "v1 = 1\n"
+ ;
+
+ stringstream ss(content1);
+ vector<option> a3 = parse_config_file(ss, desc, true).options;
+ BOOST_REQUIRE(a3.size() == 2);
+ cout << "XXX" << a3[0].value.front() << "\n";
+ check_value(a3[0], "gv1", "0");
+ check_value(a3[1], "m1.v1", "1");
}
int test_main(int, char* [])
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Boost-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/boost-cvs