mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2026-05-14 09:06:25 +02:00
90 lines
2.8 KiB
Diff
90 lines
2.8 KiB
Diff
diff --git a/gettext-tools/gnulib-tests/unicase/test-mapping-part1.h b/gettext-tools/gnulib-tests/unicase/test-mapping-part1.h
|
|
index d64bb32..f497ad4 100644
|
|
--- a/gettext-tools/gnulib-tests/unicase/test-mapping-part1.h
|
|
+++ b/gettext-tools/gnulib-tests/unicase/test-mapping-part1.h
|
|
@@ -22,6 +22,25 @@
|
|
|
|
#include "macros.h"
|
|
|
|
+#if HAVE_LIBUNISTRING
|
|
+/* The generated mappings in this source tree target Unicode 16.0.0.
|
|
+ Skip direct comparisons when an external libunistring provides a newer
|
|
+ Unicode database than the expected tables embedded in these tests. */
|
|
+extern int _libunistring_unicode_version;
|
|
+
|
|
+static int
|
|
+should_skip_for_external_libunistring_version (void)
|
|
+{
|
|
+ return _libunistring_unicode_version > 0x1000;
|
|
+}
|
|
+#else
|
|
+static int
|
|
+should_skip_for_external_libunistring_version (void)
|
|
+{
|
|
+ return 0;
|
|
+}
|
|
+#endif
|
|
+
|
|
/* Pair of Unicode characters. */
|
|
typedef struct { ucs4_t ch; ucs4_t value; } pair_t;
|
|
|
|
diff --git a/gettext-tools/gnulib-tests/unicase/test-mapping-part2.h b/gettext-tools/gnulib-tests/unicase/test-mapping-part2.h
|
|
index aa14384..80fb2b6 100644
|
|
--- a/gettext-tools/gnulib-tests/unicase/test-mapping-part2.h
|
|
+++ b/gettext-tools/gnulib-tests/unicase/test-mapping-part2.h
|
|
@@ -19,6 +19,9 @@
|
|
int
|
|
main ()
|
|
{
|
|
+ if (should_skip_for_external_libunistring_version ())
|
|
+ return 77;
|
|
+
|
|
unsigned int c;
|
|
size_t i;
|
|
|
|
diff --git a/gettext-tools/gnulib-tests/unictype/test-predicate-part1.h b/gettext-tools/gnulib-tests/unictype/test-predicate-part1.h
|
|
index caf2dc2..20a35df 100644
|
|
--- a/gettext-tools/gnulib-tests/unictype/test-predicate-part1.h
|
|
+++ b/gettext-tools/gnulib-tests/unictype/test-predicate-part1.h
|
|
@@ -22,6 +22,26 @@
|
|
|
|
#include "macros.h"
|
|
|
|
+#if HAVE_LIBUNISTRING
|
|
+/* The generated tables in this source tree target Unicode 16.0.0.
|
|
+ When these tests are linked against an external libunistring with a newer
|
|
+ Unicode database, direct table equality checks become stale and should be
|
|
+ skipped rather than reported as regressions in gettext's bundled data. */
|
|
+extern int _libunistring_unicode_version;
|
|
+
|
|
+static int
|
|
+should_skip_for_external_libunistring_version (void)
|
|
+{
|
|
+ return _libunistring_unicode_version > 0x1000;
|
|
+}
|
|
+#else
|
|
+static int
|
|
+should_skip_for_external_libunistring_version (void)
|
|
+{
|
|
+ return 0;
|
|
+}
|
|
+#endif
|
|
+
|
|
/* Interval of Unicode characters. */
|
|
typedef struct { ucs4_t start; ucs4_t end; } interval_t;
|
|
|
|
diff --git a/gettext-tools/gnulib-tests/unictype/test-predicate-part2.h b/gettext-tools/gnulib-tests/unictype/test-predicate-part2.h
|
|
index b4eef82..ac5071d 100644
|
|
--- a/gettext-tools/gnulib-tests/unictype/test-predicate-part2.h
|
|
+++ b/gettext-tools/gnulib-tests/unictype/test-predicate-part2.h
|
|
@@ -19,6 +19,9 @@
|
|
int
|
|
main ()
|
|
{
|
|
+ if (should_skip_for_external_libunistring_version ())
|
|
+ return 77;
|
|
+
|
|
unsigned int c;
|
|
size_t i;
|
|
|