mirror of
https://github.com/znc/znc.git
synced 2026-05-18 07:15:54 +02:00
Respect order of subconfigs in znc.conf
This commit is contained in:
+6
-2
@@ -87,8 +87,7 @@ class CConfigSuccessTest : public CConfigTest {
|
||||
|
||||
CConfig::SubConfigMapIterator it2 = conf.BeginSubConfigs();
|
||||
while (it2 != conf.EndSubConfigs()) {
|
||||
std::map<CString, CConfigEntry>::const_iterator it3 =
|
||||
it2->second.begin();
|
||||
auto it3 = it2->second.begin();
|
||||
|
||||
while (it3 != it2->second.end()) {
|
||||
sRes += "->" + it2->first + "/" + it3->first + "\n";
|
||||
@@ -146,6 +145,11 @@ TEST_F(CConfigSuccessTest, SubConf8) {
|
||||
TEST_SUCCESS(" \t <A B>\nfoo = bar\n\tFooO = bar\n</a>",
|
||||
"->a/B\nfoo=bar\nfooo=bar\n<-\n");
|
||||
}
|
||||
// ensure order is preserved i.e. subconfigs should not be sorted by name
|
||||
TEST_F(CConfigSuccessTest, SubConf9) {
|
||||
TEST_SUCCESS("<foo b>\n</foo>\n<foo a>\n</foo>",
|
||||
"->foo/b\n<-\n->foo/a\n<-\n");
|
||||
}
|
||||
|
||||
/* comments */
|
||||
TEST_F(CConfigSuccessTest, Comment1) {
|
||||
|
||||
Reference in New Issue
Block a user