Differences From Artifact [56c53e54e1]:
- File
tests/OFStringTests.m
— part of check-in
[4db6713bda]
at
2017-10-31 21:55:41
on branch trunk
— OFString+URLEncoding: Change default allowed chars
This is now unreserved + sub-delims from RFC 3986. (user: js, size: 33881) [annotate] [blame] [check-ins using]
To Artifact [a80b9ca389]:
- File tests/OFStringTests.m — part of check-in [2f555742c0] at 2017-11-05 19:53:31 on branch trunk — Make -[stringByURLEncoding] take an OFCharacterSet (user: js, size: 34001) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
19 20 21 22 23 24 25 26 27 28 29 30 31 32 | #include <stdlib.h> #include <string.h> #include <math.h> #import "OFString.h" #import "OFMutableString_UTF8.h" #import "OFArray.h" #import "OFURL.h" #import "OFAutoreleasePool.h" #import "OFInvalidArgumentException.h" #import "OFInvalidEncodingException.h" #import "OFInvalidFormatException.h" #import "OFOutOfRangeException.h" | > | 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 | #include <stdlib.h> #include <string.h> #include <math.h> #import "OFString.h" #import "OFMutableString_UTF8.h" #import "OFArray.h" #import "OFCharacterSet.h" #import "OFURL.h" #import "OFAutoreleasePool.h" #import "OFInvalidArgumentException.h" #import "OFInvalidEncodingException.h" #import "OFInvalidFormatException.h" #import "OFOutOfRangeException.h" |
︙ | ︙ | |||
778 779 780 781 782 783 784 | @"73286da882ffddca2f45e005cfa6b44f3fc65bfb26db1d08" @"7ded2f9c279e5addf8be854044bca0cece073fce28eec7d9"]) TEST(@"-[SHA512Hash]", [[C(@"asdfoobar") SHA512Hash] isEqual: @"0464c427da158b02161bb44a3090bbfc594611ef6a53603640454b56412a9247c" @"3579a329e53a5dc74676b106755e3394f9454a2d42273242615d32f80437d61"]) | | | > | 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 | @"73286da882ffddca2f45e005cfa6b44f3fc65bfb26db1d08" @"7ded2f9c279e5addf8be854044bca0cece073fce28eec7d9"]) TEST(@"-[SHA512Hash]", [[C(@"asdfoobar") SHA512Hash] isEqual: @"0464c427da158b02161bb44a3090bbfc594611ef6a53603640454b56412a9247c" @"3579a329e53a5dc74676b106755e3394f9454a2d42273242615d32f80437d61"]) TEST(@"-[stringByURLEncodingWithAllowedCharacters:]", [[C(@"foo\"ba'_~$]") stringByURLEncodingWithAllowedCharacters: [OFCharacterSet URLPathAllowedCharacterSet]] isEqual: @"foo%22ba'_~$%5D"]) TEST(@"-[stringByURLDecoding]", [[C(@"foo%20bar%22+%24") stringByURLDecoding] isEqual: @"foo bar\"+$"]) TEST(@"-[insertString:atIndex:]", |
︙ | ︙ |