74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
|
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
|
-
+
+
+
+
+
+
+
|
[[[OFURL URLWithString: @"foo/bar?q"
relativeToURL: [OFURL URLWithString: @"http://h/qux/quux"]]
string] isEqual: @"http://h/qux/foo/bar?q"] &&
[[[OFURL URLWithString: @"foo/bar"
relativeToURL: [OFURL URLWithString: @"http://h/qux/?x"]]
string] isEqual: @"http://h/qux/foo/bar"] &&
[[[OFURL URLWithString: @"http://foo/?q"
relativeToURL: u1] string] isEqual: @"http://foo/?q"])
relativeToURL: u1] string] isEqual: @"http://foo/?q"] &&
[[[OFURL URLWithString: @"foo"
relativeToURL: [OFURL URLWithString: @"http://foo/bar"]]
string] isEqual: @"http://foo/foo"] &&
[[[OFURL URLWithString: @"foo"
relativeToURL: [OFURL URLWithString: @"http://foo"]]
string] isEqual: @"http://foo/foo"])
EXPECT_EXCEPTION(
@"+[URLWithString:relativeToURL:] fails with invalid characters #1",
OFInvalidFormatException,
[OFURL URLWithString: @"`"
relativeToURL: u1])
|