clarify meaning of version guards for Unicode version specs [ci skip]

This commit is contained in:
Martin Dürst 2022-03-14 08:37:53 +09:00
parent 9d6cc7e4c0
commit 267f0089d3
2 changed files with 14 additions and 12 deletions

View File

@ -20,14 +20,15 @@ describe "RbConfig::CONFIG['UNICODE_EMOJI_VERSION']" do
end end
end end
ruby_version_is "3.1"..."3.2" do ruby_version_is "3.1"..."3.2" do
it "is 13.1 for Ruby 3.1" do it "is 13.1 for Ruby 3.1" do
RbConfig::CONFIG['UNICODE_EMOJI_VERSION'].should == "13.1" RbConfig::CONFIG['UNICODE_EMOJI_VERSION'].should == "13.1"
end end
end end
# Caution: ruby_version_is means is_or_later
ruby_version_is "3.2" do ruby_version_is "3.2" do
it "is 14.0 for Ruby 3.2" do it "is 14.0 for Ruby 3.2 or later" do
RbConfig::CONFIG['UNICODE_EMOJI_VERSION'].should == "14.0" RbConfig::CONFIG['UNICODE_EMOJI_VERSION'].should == "14.0"
end end
end end

View File

@ -20,14 +20,15 @@ describe "RbConfig::CONFIG['UNICODE_VERSION']" do
end end
end end
ruby_version_is "3.1"..."3.2" do ruby_version_is "3.1"..."3.2" do
it "is 13.0.0 for Ruby 3.1" do it "is 13.0.0 for Ruby 3.1" do
RbConfig::CONFIG['UNICODE_VERSION'].should == "13.0.0" RbConfig::CONFIG['UNICODE_VERSION'].should == "13.0.0"
end end
end end
# Caution: ruby_version_is means is_or_later
ruby_version_is "3.2" do ruby_version_is "3.2" do
it "is 14.0.0 for Ruby 3.2" do it "is 14.0.0 for Ruby 3.2 or later" do
RbConfig::CONFIG['UNICODE_VERSION'].should == "14.0.0" RbConfig::CONFIG['UNICODE_VERSION'].should == "14.0.0"
end end
end end