896
897
898
899
900
901
902
903
904
905
906
907
908
909
|
R([s[0] deleteTrailingWhitespaces]) && [s[0] isEqual: @""])
TEST(@"-[deleteEnclosingWhitespaces]",
(s[0] = [mutableStringClass stringWithString: whitespace[0]]) &&
R([s[0] deleteEnclosingWhitespaces]) && [s[0] isEqual: @"asd"] &&
(s[0] = [mutableStringClass stringWithString: whitespace[1]]) &&
R([s[0] deleteEnclosingWhitespaces]) && [s[0] isEqual: @""])
TEST(@"-[stringByXMLEscaping]",
(is = [C(@"<hello> &world'\"!&") stringByXMLEscaping]) &&
[is isEqual: @"<hello> &world'"!&"])
TEST(@"-[stringByXMLUnescaping]",
[[is stringByXMLUnescaping] isEqual: @"<hello> &world'\"!&"] &&
|
>
>
>
>
|
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
|
R([s[0] deleteTrailingWhitespaces]) && [s[0] isEqual: @""])
TEST(@"-[deleteEnclosingWhitespaces]",
(s[0] = [mutableStringClass stringWithString: whitespace[0]]) &&
R([s[0] deleteEnclosingWhitespaces]) && [s[0] isEqual: @"asd"] &&
(s[0] = [mutableStringClass stringWithString: whitespace[1]]) &&
R([s[0] deleteEnclosingWhitespaces]) && [s[0] isEqual: @""])
TEST(@"-[decomposedStringWithCanonicalMapping]",
[[@"H\xC3\xA4ll\xC3\xB6" decomposedStringWithCanonicalMapping]
isEqual: @"H\x61\xCC\x88ll\x6F\xCC\x88"]);
TEST(@"-[stringByXMLEscaping]",
(is = [C(@"<hello> &world'\"!&") stringByXMLEscaping]) &&
[is isEqual: @"<hello> &world'"!&"])
TEST(@"-[stringByXMLUnescaping]",
[[is stringByXMLUnescaping] isEqual: @"<hello> &world'\"!&"] &&
|