addressable 2.4.0 → 2.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,57 +0,0 @@
1
- # coding: utf-8
2
- # Copyright (C) 2006-2015 Bob Aman
3
- #
4
- # Licensed under the Apache License, Version 2.0 (the "License");
5
- # you may not use this file except in compliance with the License.
6
- # You may obtain a copy of the License at
7
- #
8
- # http://www.apache.org/licenses/LICENSE-2.0
9
- #
10
- # Unless required by applicable law or agreed to in writing, software
11
- # distributed under the License is distributed on an "AS IS" BASIS,
12
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- # See the License for the specific language governing permissions and
14
- # limitations under the License.
15
-
16
-
17
- require "spec_helper"
18
-
19
- require "addressable/uri"
20
-
21
- describe Addressable::URI, "when created with a URI known to cause crashes " +
22
- "in certain browsers" do
23
- it "should parse correctly" do
24
- uri = Addressable::URI.parse('%%30%30')
25
- expect(uri.path).to eq('%%30%30')
26
- expect(uri.normalize.path).to eq('%2500')
27
- end
28
-
29
- it "should parse correctly as a full URI" do
30
- uri = Addressable::URI.parse('http://www.example.com/%%30%30')
31
- expect(uri.path).to eq('/%%30%30')
32
- expect(uri.normalize.path).to eq('/%2500')
33
- end
34
- end
35
-
36
- describe Addressable::URI, "when created with a URI known to cause crashes " +
37
- "in certain browsers" do
38
- it "should parse correctly" do
39
- uri = Addressable::URI.parse('لُصّبُلُلصّبُررً ॣ ॣh ॣ ॣ 冗')
40
- expect(uri.path).to eq('لُصّبُلُلصّبُررً ॣ ॣh ॣ ॣ 冗')
41
- expect(uri.normalize.path).to eq(
42
- '%D9%84%D9%8F%D8%B5%D9%91%D8%A8%D9%8F%D9%84%D9%8F%D9%84%D8%B5%D9%91' +
43
- '%D8%A8%D9%8F%D8%B1%D8%B1%D9%8B%20%E0%A5%A3%20%E0%A5%A3h%20%E0%A5' +
44
- '%A3%20%E0%A5%A3%20%E5%86%97'
45
- )
46
- end
47
-
48
- it "should parse correctly as a full URI" do
49
- uri = Addressable::URI.parse('http://www.example.com/لُصّبُلُلصّبُررً ॣ ॣh ॣ ॣ 冗')
50
- expect(uri.path).to eq('/لُصّبُلُلصّبُررً ॣ ॣh ॣ ॣ 冗')
51
- expect(uri.normalize.path).to eq(
52
- '/%D9%84%D9%8F%D8%B5%D9%91%D8%A8%D9%8F%D9%84%D9%8F%D9%84%D8%B5%D9%91' +
53
- '%D8%A8%D9%8F%D8%B1%D8%B1%D9%8B%20%E0%A5%A3%20%E0%A5%A3h%20%E0%A5' +
54
- '%A3%20%E0%A5%A3%20%E5%86%97'
55
- )
56
- end
57
- end