1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
|
See https://github.com/brianmario/charlock_holmes/issues/115
--- a/test/encoding_detector_test.rb
+++ b/test/encoding_detector_test.rb
@@ -24,7 +24,7 @@
assert detected_list.is_a? Array
encoding_list = detected_list.map {|d| d[:encoding]}.sort
- assert_equal ['ISO-8859-1', 'ISO-8859-2', 'UTF-8'], encoding_list
+ assert_equal ['ISO-8859-1', 'ISO-8859-2', 'UTF-16BE', 'UTF-16LE', 'UTF-8'], encoding_list
end
def test_class_level_detect_all_method_accepts_encoding_hint
@@ -33,7 +33,7 @@
assert detected_list.is_a? Array
encoding_list = detected_list.map {|d| d[:encoding]}.sort
- assert_equal ['ISO-8859-1', 'ISO-8859-2', 'UTF-8'], encoding_list
+ assert_equal ['ISO-8859-1', 'ISO-8859-2', 'UTF-16BE', 'UTF-16LE', 'UTF-8'], encoding_list
end
def test_has_detect_method
@@ -54,7 +54,7 @@
assert detected_list.is_a? Array
encoding_list = detected_list.map {|d| d[:encoding]}.sort
- assert_equal ['ISO-8859-1', 'ISO-8859-2', 'UTF-8'], encoding_list
+ assert_equal ['ISO-8859-1', 'ISO-8859-2', 'UTF-16BE', 'UTF-16LE', 'UTF-8'], encoding_list
end
def test_detect_all_accepts_encoding_hint
@@ -63,7 +63,7 @@
assert detected_list.is_a? Array
encoding_list = detected_list.map {|d| d[:encoding]}.sort
- assert_equal ['ISO-8859-1', 'ISO-8859-2', 'UTF-8'], encoding_list
+ assert_equal ['ISO-8859-1', 'ISO-8859-2', 'UTF-16BE', 'UTF-16LE', 'UTF-8'], encoding_list
end
def test_strip_tags_flag
--- a/test/string_methods_test.rb
+++ b/test/string_methods_test.rb
@@ -26,7 +26,7 @@
assert detected_list.is_a? Array
encoding_list = detected_list.map {|d| d[:encoding]}.sort
- assert_equal ['ISO-8859-1', 'ISO-8859-2', 'UTF-8'], encoding_list
+ assert_equal ['ISO-8859-1', 'ISO-8859-2', 'UTF-16BE', 'UTF-16LE', 'UTF-8'], encoding_list
end
def test_detect_encodings_accepts_encoding_hint_param
@@ -37,7 +37,7 @@
assert detected_list.is_a? Array
encoding_list = detected_list.map {|d| d[:encoding]}.sort
- assert_equal ['ISO-8859-1', 'ISO-8859-2', 'UTF-8'], encoding_list
+ assert_equal ['ISO-8859-1', 'ISO-8859-2', 'UTF-16BE', 'UTF-16LE', 'UTF-8'], encoding_list
end
def test_returns_a_ruby_compatible_encoding_name
|