diff options
author | A. Wilcox <AWilcox@Wilcox-Tech.com> | 2022-02-20 22:24:47 -0600 |
---|---|---|
committer | A. Wilcox <AWilcox@Wilcox-Tech.com> | 2022-05-01 17:05:53 -0500 |
commit | 983bb71fcf45dcd3c112e6b5fd000bfd03301bce (patch) | |
tree | 9f5fd54170aeba5936a709ade17a1700339cefc6 /system/icu/tests.patch | |
parent | a0b4c0dd4e799c68021c4760d775613fe7b64598 (diff) | |
download | packages-983bb71fcf45dcd3c112e6b5fd000bfd03301bce.tar.gz packages-983bb71fcf45dcd3c112e6b5fd000bfd03301bce.tar.bz2 packages-983bb71fcf45dcd3c112e6b5fd000bfd03301bce.tar.xz packages-983bb71fcf45dcd3c112e6b5fd000bfd03301bce.zip |
system/icu: Update to 70.1
Diffstat (limited to 'system/icu/tests.patch')
-rw-r--r-- | system/icu/tests.patch | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/system/icu/tests.patch b/system/icu/tests.patch new file mode 100644 index 000000000..499b8ec2e --- /dev/null +++ b/system/icu/tests.patch @@ -0,0 +1,41 @@ +Upstream report: https://unicode-org.atlassian.net/browse/ICU-21793 + +From 1b84ce27b41067e8f913da074917a1f6f9831fb9 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Lal?= <kapouer@melix.org> +Date: Wed, 3 Nov 2021 02:31:18 +0100 +Subject: [PATCH] ICU-21793 Fix ucptrietest golden diff + +--- + icu4c/source/tools/toolutil/toolutil.cpp | 13 +++++++------ + 1 file changed, 7 insertions(+), 6 deletions(-) + +diff --git a/icu4c/source/tools/toolutil/toolutil.cpp b/icu4c/source/tools/toolutil/toolutil.cpp +index 1fc68aa69c8..a9dc37377a8 100644 +--- a/tools/toolutil/toolutil.cpp ++++ b/tools/toolutil/toolutil.cpp +@@ -228,18 +228,19 @@ uprv_compareGoldenFiles( + std::ifstream ifs(goldenFilePath, std::ifstream::in); + int32_t pos = 0; + char c; +- while ((c = ifs.get()) != std::char_traits<char>::eof() && pos < bufferLen) { ++ while (ifs.get(c) && pos < bufferLen) { + if (c != buffer[pos]) { + // Files differ at this position +- return pos; ++ break; + } + pos++; + } +- if (pos < bufferLen || c != std::char_traits<char>::eof()) { +- // Files are different lengths +- return pos; ++ if (pos == bufferLen && ifs.eof()) { ++ // Files are same lengths ++ pos = -1; + } +- return -1; ++ ifs.close(); ++ return pos; + } + + /*U_CAPI UDate U_EXPORT2 |