From 8acd0dea58b2195981dadd3ecd5a1a6de3548b35 Mon Sep 17 00:00:00 2001 From: nick black Date: Wed, 7 Oct 2020 02:27:17 -0400 Subject: [PATCH] MultiglyphWidth test: work around freebsd breakage #1046 --- tests/cell.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tests/cell.cpp b/tests/cell.cpp index 28299714b..a321ce7ba 100644 --- a/tests/cell.cpp +++ b/tests/cell.cpp @@ -54,9 +54,16 @@ TEST_CASE("Cell") { // test combining characters and ZWJs SUBCASE("MultiglyphWidth") { +#ifdef __linux__ CHECK(2 == ncstrwidth("\U0001F471")); CHECK(2 == ncstrwidth("\U0001F471\u200D")); CHECK(3 == ncstrwidth("\U0001F471\u200D\u2640")); // *not* a single EGC! +#else + // FreeBSD doesn't think these wide + CHECK(1 == ncstrwidth("\U0001F471")); + CHECK(1 == ncstrwidth("\U0001F471\u200D")); + CHECK(2 == ncstrwidth("\U0001F471\u200D\u2640")); // *not* a single EGC! +#endif } SUBCASE("SetItalic") {