aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/test/multibyte_grapheme_break_conformance_test.rb
diff options
context:
space:
mode:
Diffstat (limited to 'activesupport/test/multibyte_grapheme_break_conformance_test.rb')
-rw-r--r--activesupport/test/multibyte_grapheme_break_conformance_test.rb22
1 files changed, 11 insertions, 11 deletions
diff --git a/activesupport/test/multibyte_grapheme_break_conformance_test.rb b/activesupport/test/multibyte_grapheme_break_conformance_test.rb
index 1d52a56971..5dc42df08d 100644
--- a/activesupport/test/multibyte_grapheme_break_conformance_test.rb
+++ b/activesupport/test/multibyte_grapheme_break_conformance_test.rb
@@ -1,16 +1,16 @@
# encoding: utf-8
-require 'abstract_unit'
-require 'multibyte_test_helpers'
+require "abstract_unit"
+require "multibyte_test_helpers"
-require 'fileutils'
-require 'open-uri'
-require 'tmpdir'
+require "fileutils"
+require "open-uri"
+require "tmpdir"
class MultibyteGraphemeBreakConformanceTest < ActiveSupport::TestCase
include MultibyteTestHelpers
- UNIDATA_FILE = '/auxiliary/GraphemeBreakTest.txt'
+ UNIDATA_FILE = "/auxiliary/GraphemeBreakTest.txt"
RUN_P = begin
Downloader.download(UNIDATA_URL + UNIDATA_FILE, CACHE_DIR + UNIDATA_FILE)
rescue
@@ -32,20 +32,20 @@ class MultibyteGraphemeBreakConformanceTest < ActiveSupport::TestCase
def each_line_of_break_tests(&block)
lines = 0
max_test_lines = 0 # Don't limit below 21, because that's the header of the testfile
- File.open(File.join(CACHE_DIR, UNIDATA_FILE), 'r') do | f |
+ File.open(File.join(CACHE_DIR, UNIDATA_FILE), "r") do | f |
until f.eof? || (max_test_lines > 21 and lines > max_test_lines)
lines += 1
line = f.gets.chomp!
- next if line.empty? || line.start_with?('#')
+ next if line.empty? || line.start_with?("#")
cols, comment = line.split("#")
# Cluster breaks are represented by ÷
- clusters = cols.split("÷").map{|e| e.strip}.reject{|e| e.empty? }
+ clusters = cols.split("÷").map { |e| e.strip }.reject { |e| e.empty? }
clusters = clusters.map do |cluster|
# Codepoints within each cluster are separated by ×
- codepoints = cluster.split("×").map{|e| e.strip}.reject{|e| e.empty? }
+ codepoints = cluster.split("×").map { |e| e.strip }.reject { |e| e.empty? }
# codepoints are in hex in the test suite, pack wants them as integers
- codepoints.map{|codepoint| codepoint.to_i(16)}
+ codepoints.map { |codepoint| codepoint.to_i(16) }
end
# The tests contain a solitary U+D800 <Non Private Use High