-void UnicodeTestCase::TextFileRead()
-{
- wxTextFile file;
- bool file_opened = file.Open(_T("testdata.fc"), wxConvLocal);
-
- CPPUNIT_ASSERT( file_opened );
-
- static const wxChar *lines[6] = {
- _T("# this is the test data file for wxFileConfig tests"),
- _T("value1=one"),
- _T("# a comment here"),
- _T("value2=two"),
- _T("value\\ with\\ spaces\\ inside\\ it=nothing special"),
- _T("path=$PATH")
- };
-
- if( file_opened )
- {
- const size_t count = file.GetLineCount();
- CPPUNIT_ASSERT( count == 6 );
- for ( size_t n = 0; n < count; n++ )
- {
- CPPUNIT_ASSERT( wxStrcmp( file[n].c_str() , lines[n] ) == 0 );
- }
- }
-}