Compare commits
7 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
43c2e4c970 | ||
|
|
b429b74638 | ||
|
|
7f8bd27d2e | ||
|
|
efff9ad217 | ||
|
|
f3fb1b87c1 | ||
|
|
76805c3b26 | ||
|
|
5e7be62153 |
2 changed files with 55 additions and 1 deletions
33
ocaml-calendar-timezone-test.patch
Normal file
33
ocaml-calendar-timezone-test.patch
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
When the tests are executed in Mountain Standard Time, the timezone test fails:
|
||||
|
||||
ASSERT gap g6 Local = gap g6 UTC + gap UTC Local
|
||||
File "tests/test_timezone.ml", line 37, character 2:
|
||||
FAIL gap g6 Local = gap g6 UTC + gap UTC Local
|
||||
|
||||
Expected: `11'
|
||||
Received: `-13'
|
||||
|
||||
--- calendar-3.0.0/tests/test_timezone.ml.orig 2022-10-11 09:39:06.000000000 -0600
|
||||
+++ calendar-3.0.0/tests/test_timezone.ml 2024-12-13 11:20:28.349298798 -0700
|
||||
@@ -27,6 +27,12 @@ open Time_Zone;;
|
||||
|
||||
let tz = Alcotest.testable (Fmt.always "timezone") (=) ;;
|
||||
|
||||
+let make_in_bounds x =
|
||||
+ let y = x mod 24 in
|
||||
+ if y < -12 then y + 24
|
||||
+ else if y > 11 then y - 24
|
||||
+ else y
|
||||
+
|
||||
let test () =
|
||||
change UTC;
|
||||
Alcotest.(check tz) "current () = UTC" UTC (current ());
|
||||
@@ -36,7 +42,7 @@ let test () =
|
||||
let g6 = UTC_Plus 6 in
|
||||
Alcotest.(check int)
|
||||
"gap g6 Local = gap g6 UTC + gap UTC Local"
|
||||
- (gap g6 Local) (gap g6 UTC + gap UTC Local);
|
||||
+ (gap g6 Local) (make_in_bounds (gap g6 UTC + gap UTC Local));
|
||||
Gen_test.test_exn (lazy (change (UTC_Plus 13))) "change 13";
|
||||
Gen_test.test_exn (lazy (change (UTC_Plus (-15)))) "change (-15)";
|
||||
change (UTC_Plus 4);
|
||||
|
|
@ -15,13 +15,15 @@ ExcludeArch: %{ix86}
|
|||
Name: ocaml-calendar
|
||||
Epoch: 1
|
||||
Version: 3.0.0
|
||||
Release: 13%{?dist}
|
||||
Release: 19%{?dist}
|
||||
Summary: Objective Caml library for managing dates and times
|
||||
License: LGPL-2.1-or-later WITH OCaml-LGPL-linking-exception
|
||||
|
||||
URL: https://ocaml-community.github.io/calendar/
|
||||
VCS: git:%{giturl}.git
|
||||
Source0: %{giturl}/archive/v%{version}/calendar-%{version}.tar.gz
|
||||
# Work around https://github.com/ocaml-community/calendar/issues/43
|
||||
Patch: %{name}-timezone-test.patch
|
||||
|
||||
BuildRequires: ocaml >= 4.03
|
||||
BuildRequires: ocaml-dune >= 1.0
|
||||
|
|
@ -75,6 +77,25 @@ developing applications that use %{name}.
|
|||
|
||||
|
||||
%changelog
|
||||
* Mon Oct 13 2025 Richard W.M. Jones <rjones@redhat.com> - 1:3.0.0-19
|
||||
- OCaml 5.4.0 rebuild
|
||||
|
||||
* Thu Jul 24 2025 Fedora Release Engineering <releng@fedoraproject.org> - 1:3.0.0-18
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild
|
||||
|
||||
* Sat Jul 12 2025 Jerry James <loganjerry@gmail.com> - 1:3.0.0-17
|
||||
- Rebuild to fix OCaml dependencies
|
||||
|
||||
* Fri Jan 17 2025 Fedora Release Engineering <releng@fedoraproject.org> - 1:3.0.0-16
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild
|
||||
|
||||
* Fri Jan 10 2025 Jerry James <loganjerry@gmail.com> - 1:3.0.0-15
|
||||
- OCaml 5.3.0 rebuild for Fedora 42
|
||||
- Add patch for a test failure
|
||||
|
||||
* Thu Oct 03 2024 Richard W.M. Jones <rjones@redhat.com> - 1:3.0.0-14
|
||||
- Rebuild against ocaml-re 1.13.3 (RHBZ#2316105)
|
||||
|
||||
* Thu Jul 18 2024 Fedora Release Engineering <releng@fedoraproject.org> - 1:3.0.0-13
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue