std::string test_spaces("config/disk/u7path_with_spaces"); config.value(test_spaces, r, "--nil--"); cout << "Returned from reference, \"" << test_spaces << "\". Got '" << r << "'" << endl; assert(r=="d:\\ultima series\\ultima vii - the serpent isle");
void	test1(void){	config.read_config_file("./config.xml");	int	n;	std::string	r;		config.dump(cout, "\t");	cout << endl;		std::string test_device("config/audio/midi/device");	config.value(test_device, n, -1);	cout << "Returned from reference, \"" << test_device << "\". Got '" << n << "'" << endl;	assert(n==5);		std::string test_enabled("config/audio/midi/enabled");	config.value(test_enabled, r, "--nil--");	cout << "Returned from reference, \"" << test_enabled << "\". Got '" << r << "'" << endl;	assert(r=="yes");	/*std::string test_debug("config/debugging/");	config.value(test_debug, r, "--nil--");	cout << "Returned from reference, \"" << test_debug << "\". Got '" << r << "'" << endl;	assert(r=="yes");*/		config.set("config/something/something/else", "wibble", false);	std::string	out=config.dump();	cout << out << endl;	std::vector<std::string> vs;	vs=config.listkeys("config");	dump_stringvec(vs,6);	vs=config.listkeys("config/audio");	dump_stringvec(vs,4);	vs=config.listkeys("config/something",false);	dump_stringvec(vs,1);	vs=config.listkeys("config/somenonexistantthing");	dump_stringvec(vs,0);	config.clear();	//cout << endl << config.dump() << endl;	assert(config.dump()=="<config>\n</config>\n");		Configuration config_slash(string(""), string("root"));	//cout << endl << config_slash.dump() << endl;	assert(config_slash.dump()=="<root>\n</root>\n");		config.clear("foo");	assert(config.dump()=="<foo>\n</foo>\n");		Configuration confnew("./config.xml", "config");		Configuration::KeyTypeList ktl;	string basekey("config/audio");	confnew.getsubkeys(ktl, basekey);		cout << endl;		for(Configuration::KeyTypeList::iterator i=ktl.begin(); i!=ktl.end(); i++)		cout << "Key:\t" << i->first << endl << "Value:\t" << i->second << endl;	assert(ktl.size()==7);	}