gnu: icu4c-73-promise: Fix broken test.
* gnu/local.mk (dist_patch_DATA): Add patch. * gnu/packages/gnuzilla.scm (icu4c-73-promise)[source]: Add patch. * gnu/packages/patches/icu4c-fix-TestHebrewCalendarInTemporalLeapYear.patch: New file.master
parent
87ffb3d3fb
commit
7937c8827b
|
@ -13,7 +13,7 @@
|
||||||
# Copyright © 2016-2023 Efraim Flashner <efraim@flashner.co.il>
|
# Copyright © 2016-2023 Efraim Flashner <efraim@flashner.co.il>
|
||||||
# Copyright © 2016, 2017, 2018, 2019, 2020, 2021, 2022, 2023 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
# Copyright © 2016, 2017, 2018, 2019, 2020, 2021, 2022, 2023 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||||
# Copyright © 2017, 2018, 2019, 2020 Tobias Geerinckx-Rice <me@tobias.gr>
|
# Copyright © 2017, 2018, 2019, 2020 Tobias Geerinckx-Rice <me@tobias.gr>
|
||||||
# Copyright © 2017, 2018 Clément Lassieur <clement@lassieur.org>
|
# Copyright © 2017, 2018, 2023 Clément Lassieur <clement@lassieur.org>
|
||||||
# Copyright © 2017, 2020 Mathieu Othacehe <m.othacehe@gmail.com>
|
# Copyright © 2017, 2020 Mathieu Othacehe <m.othacehe@gmail.com>
|
||||||
# Copyright © 2017, 2018, 2019 Gábor Boskovits <boskovits@gmail.com>
|
# Copyright © 2017, 2018, 2019 Gábor Boskovits <boskovits@gmail.com>
|
||||||
# Copyright © 2018 Amirouche Boubekki <amirouche@hypermove.net>
|
# Copyright © 2018 Amirouche Boubekki <amirouche@hypermove.net>
|
||||||
|
@ -1417,6 +1417,7 @@ dist_patch_DATA = \
|
||||||
%D%/packages/patches/icecat-use-system-media-libs.patch \
|
%D%/packages/patches/icecat-use-system-media-libs.patch \
|
||||||
%D%/packages/patches/icedtea-7-hotspot-aarch64-use-c++98.patch \
|
%D%/packages/patches/icedtea-7-hotspot-aarch64-use-c++98.patch \
|
||||||
%D%/packages/patches/icedtea-7-hotspot-pointer-comparison.patch \
|
%D%/packages/patches/icedtea-7-hotspot-pointer-comparison.patch \
|
||||||
|
%D%/packages/patches/icu4c-fix-TestHebrewCalendarInTemporalLeapYear.patch \
|
||||||
%D%/packages/patches/id3lib-CVE-2007-4460.patch \
|
%D%/packages/patches/id3lib-CVE-2007-4460.patch \
|
||||||
%D%/packages/patches/id3lib-UTF16-writing-bug.patch \
|
%D%/packages/patches/id3lib-UTF16-writing-bug.patch \
|
||||||
%D%/packages/patches/idris-test-ffi008.patch \
|
%D%/packages/patches/idris-test-ffi008.patch \
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
;;; Copyright © 2015 Sou Bunnbu <iyzsong@gmail.com>
|
;;; Copyright © 2015 Sou Bunnbu <iyzsong@gmail.com>
|
||||||
;;; Copyright © 2016, 2017, 2018, 2019, 2021 Efraim Flashner <efraim@flashner.co.il>
|
;;; Copyright © 2016, 2017, 2018, 2019, 2021 Efraim Flashner <efraim@flashner.co.il>
|
||||||
;;; Copyright © 2016 Alex Griffin <a@ajgrf.com>
|
;;; Copyright © 2016 Alex Griffin <a@ajgrf.com>
|
||||||
;;; Copyright © 2017 Clément Lassieur <clement@lassieur.org>
|
;;; Copyright © 2017, 2023 Clément Lassieur <clement@lassieur.org>
|
||||||
;;; Copyright © 2017, 2018 Nikita <nikita@n0.is>
|
;;; Copyright © 2017, 2018 Nikita <nikita@n0.is>
|
||||||
;;; Copyright © 2017, 2018, 2020 Tobias Geerinckx-Rice <me@tobias.gr>
|
;;; Copyright © 2017, 2018, 2020 Tobias Geerinckx-Rice <me@tobias.gr>
|
||||||
;;; Copyright © 2018, 2020 Ricardo Wurmus <rekado@elephly.net>
|
;;; Copyright © 2018, 2020 Ricardo Wurmus <rekado@elephly.net>
|
||||||
|
@ -392,7 +392,12 @@ from collections.abc import MutableSequence"))))
|
||||||
"-src.tgz"))
|
"-src.tgz"))
|
||||||
(sha256
|
(sha256
|
||||||
(base32
|
(base32
|
||||||
"0iccpdvc0kvpww5a31k9gjkqigyz016i7v80r9zamd34w4fl6mx4")))))))
|
"0iccpdvc0kvpww5a31k9gjkqigyz016i7v80r9zamd34w4fl6mx4"))
|
||||||
|
(patches
|
||||||
|
(cons
|
||||||
|
(search-patch
|
||||||
|
"icu4c-fix-TestHebrewCalendarInTemporalLeapYear.patch")
|
||||||
|
(origin-patches (package-source icu4c)))))))))
|
||||||
|
|
||||||
;;;
|
;;;
|
||||||
;;; Localization helper procedures.
|
;;; Localization helper procedures.
|
||||||
|
|
|
@ -0,0 +1,33 @@
|
||||||
|
From b6b3e89231a623441940889b5badd90f74bdce2b Mon Sep 17 00:00:00 2001
|
||||||
|
From: Frank Tang <ftang@chromium.org>
|
||||||
|
Date: Mon, 18 Sep 2023 20:20:42 -0700
|
||||||
|
Subject: [PATCH] ICU-22512 Fix broken TestHebrewCalendarInTemporalLeapYear
|
||||||
|
|
||||||
|
Fix broken test mistakenly landed in
|
||||||
|
https://github.com/unicode-org/icu/pull/2274
|
||||||
|
|
||||||
|
Some important steps were missed in the last landing.
|
||||||
|
---
|
||||||
|
icu4c/source/test/intltest/caltest.cpp | 2 ++
|
||||||
|
1 file changed, 2 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/icu4c/source/test/intltest/caltest.cpp b/icu4c/source/test/intltest/caltest.cpp
|
||||||
|
index 9d89f468eef0..18b96f231ba3 100644
|
||||||
|
--- a/source/test/intltest/caltest.cpp
|
||||||
|
+++ b/source/test/intltest/caltest.cpp
|
||||||
|
@@ -4028,6 +4028,7 @@ void CalendarTest::TestHebrewCalendarInTemporalLeapYear() {
|
||||||
|
for (gc.set(startYear, UCAL_JANUARY, 1);
|
||||||
|
gc.get(UCAL_YEAR, status) <= stopYear;
|
||||||
|
gc.add(UCAL_DATE, incrementDays, status)) {
|
||||||
|
+ cal->setTime(gc.getTime(status), status);
|
||||||
|
if (failure(status, "add/get/set/getTime/setTime incorrect")) return;
|
||||||
|
|
||||||
|
int32_t cal_year = cal->get(UCAL_EXTENDED_YEAR, status);
|
||||||
|
@@ -4036,6 +4037,7 @@ void CalendarTest::TestHebrewCalendarInTemporalLeapYear() {
|
||||||
|
leapTest->set(UCAL_MONTH, 0);
|
||||||
|
leapTest->set(UCAL_DATE, 1);
|
||||||
|
// If 10 months after TISHRI is TAMUZ, then it is a leap year.
|
||||||
|
+ leapTest->add(UCAL_MONTH, 10, status);
|
||||||
|
hasLeapMonth = leapTest->get(UCAL_MONTH, status) == icu::HebrewCalendar::TAMUZ;
|
||||||
|
yearForHasLeapMonth = cal_year;
|
||||||
|
}
|
Reference in New Issue