utf8_validator 1.0.9 → 1.0.10

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.0.8
1
+ 1.0.10
@@ -3,7 +3,7 @@
3
3
  # Show how to parse a full string with multiple UTF8 validation failures.
4
4
  # Accumulate error information, and report it.
5
5
  #
6
- require 'rubygems' unless RUBY_VERSION =~ /1\.9/
6
+ require 'rubygems' if RUBY_VERSION =~ /1\.8/
7
7
  require 'utf8_validator'
8
8
  #
9
9
  # = Purpose
@@ -135,6 +135,33 @@ class TestUtf8Validator < Test::Unit::TestCase
135
135
  end
136
136
  end
137
137
 
138
+ # Runes, reference:
139
+ # http://en.wikipedia.org/wiki/Runes
140
+ def test_0090_runes
141
+ test_data = [
142
+ "\u1680","\u1681","\u1682","\u1683","\u1684","\u1685","\u1686","\u1687",
143
+ "\u1688","\u1689","\u168a","\u168b","\u168c","\u168d","\u168e","\u168f",
144
+ "\u1690","\u1691","\u1692","\u1693","\u1694","\u1695","\u1696","\u1697",
145
+ "\u1698","\u1699","\u169a","\u169b","\u169c","\u169d","\u169e","\u169f",
146
+ "\u16a0","\u16a1","\u16a2","\u16a3","\u16a4","\u16a5","\u16a6","\u16a7",
147
+ "\u16a8","\u16a9","\u16aa","\u16ab","\u16ac","\u16ad","\u16ae","\u16af",
148
+ "\u16b0","\u16b1","\u16b2","\u16b3","\u16b4","\u16b5","\u16b6","\u16b7",
149
+ "\u16b8","\u16b9","\u16ba","\u16bb","\u16bc","\u16bd","\u16be","\u16bf",
150
+ "\u16c0","\u16c1","\u16c2","\u16c3","\u16c4","\u16c5","\u16c6","\u16c7",
151
+ "\u16c8","\u16c9","\u16ca","\u16cb","\u16cc","\u16cd","\u16ce","\u16cf",
152
+ "\u16d0","\u16d1","\u16d2","\u16d3","\u16d4","\u16d5","\u16d6","\u16d7",
153
+ "\u16d8","\u16d9","\u16da","\u16db","\u16dc","\u16dd","\u16de","\u16df",
154
+ "\u16e0","\u16e1","\u16e2","\u16e3","\u16e4","\u16e5","\u16e6","\u16e7",
155
+ "\u16e8","\u16e9","\u16ea","\u16eb","\u16ec","\u16ed","\u16ee","\u16ef",
156
+ "\u16f0",
157
+
158
+ ]
159
+ test_data.each do |string|
160
+ assert @validator.valid_encoding?(string), "interesting valid strings: #{string}"
161
+ assert string.force_encoding("UTF-8").valid_encoding?, "interesting valid strings 19: #{string}" if @vercheck
162
+ end
163
+ end
164
+
138
165
  #--
139
166
  # Validation should fail for the following tests
140
167
  #--
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{utf8_validator}
8
- s.version = "1.0.9"
8
+ s.version = "1.0.10"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Guy Allard"]
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: utf8_validator
3
3
  version: !ruby/object:Gem::Version
4
- hash: 5
4
+ hash: 3
5
5
  prerelease: false
6
6
  segments:
7
7
  - 1
8
8
  - 0
9
- - 9
10
- version: 1.0.9
9
+ - 10
10
+ version: 1.0.10
11
11
  platform: ruby
12
12
  authors:
13
13
  - Guy Allard