Sha256: 5ed62e93b2f56b9794e9d83aa890245220ca489ffc1f1b3ba0738067fb2a1290
Contents?: true
Size: 775 Bytes
Versions: 27
Compression:
Stored size: 775 Bytes
Contents
# encoding: UTF-8 # Copyright 2012 Twitter, Inc # http://www.apache.org/licenses/LICENSE-2.0 require 'spec_helper' describe TwitterCldr::Parsers::UnicodeRegexParser::UnicodeString do describe "#to_set" do it "should return a zero-length range when representing a single codepoint" do str = described_class.new([97]) expect(str.to_set.to_a).to eq([97..97]) end it "should return a range containing the codepoint array as both the first and last elements" do str = described_class.new([97, 98, 99]) expect(str.to_set.to_a).to eq([[97, 98, 99]..[97, 98, 99]]) end it "should covert the codepoints to a valid regex" do str = described_class.new(97) expect(str.to_regexp_str).to eq("(?:\\u{0061})") end end end
Version data entries
27 entries across 27 versions & 1 rubygems