@@ -43,11 +43,11 @@ @"new=new" NL NL @"[foobar]" NL @";foobarcomment" NL @"qux=\" asd\"" NL - @"quxquxqux=\"hello\\\"world\"" NL + @"quxquxqux=\"hello\\\"wörld\"" NL @"qux2=\"a\\f\"" NL @"qux3=a\fb" NL NL @"[types]" NL @"integer=16" NL @@ -55,12 +55,13 @@ @"float=0.25" NL @"double=0.75" NL; OFINIFile *file; OFINICategory *tests, *foobar, *types; - TEST(@"+[fileWithPath:]", - (file = [OFINIFile fileWithPath: @"testfile.ini"])) + TEST(@"+[fileWithPath:encoding:]", + (file = [OFINIFile fileWithPath: @"testfile.ini" + encoding: OF_STRING_ENCODING_CODEPAGE_437])) tests = [file categoryForName: @"tests"]; foobar = [file categoryForName: @"foobar"]; types = [file categoryForName: @"types"]; TEST(@"-[categoryForName:]", @@ -68,11 +69,11 @@ module = @"OFINICategory"; TEST(@"-[stringForKey:]", [[tests stringForKey: @"foo"] isEqual: @"bar"] && - [[foobar stringForKey: @"quxquxqux"] isEqual: @"hello\"world"]) + [[foobar stringForKey: @"quxquxqux"] isEqual: @"hello\"wörld"]) TEST(@"-[setString:forKey:]", R([tests setString: @"baz" forKey: @"foo"]) && R([tests setString: @"new" @@ -113,16 +114,20 @@ module = @"OFINIFile"; /* FIXME: Find a way to write files on Nintendo DS */ #ifndef OF_NINTENDO_DS - TEST(@"-[writeToFile:]", R([file writeToFile: @"tmpfile.ini"]) && - [[OFString stringWithContentsOfFile: @"tmpfile.ini"] + TEST(@"-[writeToFile:encoding:]", + R([file writeToFile: @"tmpfile.ini" + encoding: OF_STRING_ENCODING_CODEPAGE_437]) && + [[OFString + stringWithContentsOfFile: @"tmpfile.ini" + encoding: OF_STRING_ENCODING_CODEPAGE_437] isEqual: output]) [OFFile removeItemAtPath: @"tmpfile.ini"]; #else (void)output; #endif [pool drain]; } @end