Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix spec for String#encode and String.new on DragonFlyBSD #13944

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions spec/std/string_spec.cr
Original file line number Diff line number Diff line change
Expand Up @@ -2755,7 +2755,7 @@ describe "String" do
bytes.to_a.should eq([72, 0, 101, 0, 108, 0, 108, 0, 111, 0])
end

{% unless flag?(:musl) || flag?(:freebsd) %}
{% unless flag?(:musl) || flag?(:freebsd) || flag?(:dragonfly) %}
it "flushes the shift state (#11992)" do
"\u{00CA}".encode("BIG5-HKSCS").should eq(Bytes[0x88, 0x66])
"\u{00CA}\u{0304}".encode("BIG5-HKSCS").should eq(Bytes[0x88, 0x62])
Expand All @@ -2764,7 +2764,7 @@ describe "String" do

# FreeBSD iconv encoder expects ISO/IEC 10646 compatibility code points,
# see https://www.ccli.gov.hk/doc/e_hkscs_2008.pdf for details.
{% if flag?(:freebsd) %}
{% if flag?(:freebsd) || flag?(:dragonfly) %}
it "flushes the shift state (#11992)" do
"\u{F329}".encode("BIG5-HKSCS").should eq(Bytes[0x88, 0x66])
"\u{F325}".encode("BIG5-HKSCS").should eq(Bytes[0x88, 0x62])
Expand Down Expand Up @@ -2808,7 +2808,7 @@ describe "String" do
String.new(bytes, "UTF-16LE").should eq("Hello")
end

{% unless flag?(:freebsd) %}
{% unless flag?(:freebsd) || flag?(:dragonfly) %}
it "decodes with shift state" do
String.new(Bytes[0x88, 0x66], "BIG5-HKSCS").should eq("\u{00CA}")
String.new(Bytes[0x88, 0x62], "BIG5-HKSCS").should eq("\u{00CA}\u{0304}")
Expand All @@ -2817,7 +2817,7 @@ describe "String" do

# FreeBSD iconv decoder returns ISO/IEC 10646-1:2000 code points,
# see https://www.ccli.gov.hk/doc/e_hkscs_2008.pdf for details.
{% if flag?(:freebsd) %}
{% if flag?(:freebsd) || flag?(:dragonfly) %}
it "decodes with shift state" do
String.new(Bytes[0x88, 0x66], "BIG5-HKSCS").should eq("\u{00CA}")
String.new(Bytes[0x88, 0x62], "BIG5-HKSCS").should eq("\u{F325}")
Expand Down
Loading