Differences From Artifact [c166811b76]:
- File tests/OFStringTests.m — part of check-in [ec17b9225a] at 2019-04-06 20:35:03 on branch trunk — Improve path handling on Windows/DOS (user: js, size: 53938) [annotate] [blame] [check-ins using]
To Artifact [e7c58a38d5]:
- File
tests/OFStringTests.m
— part of check-in
[efb964a3ae]
at
2019-04-14 10:59:11
on branch trunk
— OFStringTests: Fix a new Clang warning
The idea was to have garbage before and remove it with the + 3, to
prevent compilers from potentially being smart in the future and
stripping the BOM. This hasn't happened, and instead they got smarter
with warnings, to remove that hack. (user: js, size: 53931) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
352 353 354 355 356 357 358 | TEST(@"+[stringWithContentsOfURL:encoding]", (is = [stringClass stringWithContentsOfURL: [OFURL fileURLWithPath: @"testfile.txt"] encoding: OF_STRING_ENCODING_ISO_8859_1]) && [is isEqual: @"testäöü"]) #endif TEST(@"-[appendUTFString:length:]", | | | 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 | TEST(@"+[stringWithContentsOfURL:encoding]", (is = [stringClass stringWithContentsOfURL: [OFURL fileURLWithPath: @"testfile.txt"] encoding: OF_STRING_ENCODING_ISO_8859_1]) && [is isEqual: @"testäöü"]) #endif TEST(@"-[appendUTFString:length:]", R([s[0] appendUTF8String: "\xEF\xBB\xBF" "barqux" length: 6]) && [s[0] isEqual: @"foobar"]) EXPECT_EXCEPTION(@"Detection of invalid UTF-8 encoding #1", OFInvalidEncodingException, [stringClass stringWithUTF8String: "\xE0\x80"]) EXPECT_EXCEPTION(@"Detection of invalid UTF-8 encoding #2", OFInvalidEncodingException, |
︙ | ︙ |