From 479d634a99c04a93ec53d6540cfa2ae94503d4c0 Mon Sep 17 00:00:00 2001 From: Evangelos Paterakis Date: Fri, 3 Nov 2023 05:57:13 +0200 Subject: [PATCH] Fix spec for `String#encode` and `String.new` on DragonFlyBSD --- spec/std/string_spec.cr | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/spec/std/string_spec.cr b/spec/std/string_spec.cr index 798b547eb06e..8a372a370677 100644 --- a/spec/std/string_spec.cr +++ b/spec/std/string_spec.cr @@ -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]) @@ -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]) @@ -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}") @@ -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}")