CPPUNIT_TEST( CreateSubgroupAndEntries );
CPPUNIT_TEST( DeleteLastGroup );
CPPUNIT_TEST( DeleteAndRecreateGroup );
+ CPPUNIT_TEST( AddToExistingRoot );
CPPUNIT_TEST_SUITE_END();
void Path();
void CreateSubgroupAndEntries();
void DeleteLastGroup();
void DeleteAndRecreateGroup();
+ void AddToExistingRoot();
+
static wxString ChangePath(wxFileConfig& fc, const wxChar *path)
{
fc );
}
+void FileConfigTestCase::AddToExistingRoot()
+{
+ static const wxChar *confInitial =
+ _T("[Group]\n")
+ _T("value1=foo\n");
+
+ wxStringInputStream sis(confInitial);
+ wxFileConfig fc(sis);
+
+ fc.Write(_T("/value1"), _T("bar"));
+ wxVERIFY_FILECONFIG(
+ _T("value1=bar\n")
+ _T("[Group]\n")
+ _T("value1=foo\n"),
+ fc
+ );
+}
+
#endif // wxUSE_FILECONFIG