patch a doc test that depends on byte order

epel9
Fabio Valentini 4 years ago
parent cbfb4ed3d5
commit a22c555583
No known key found for this signature in database
GPG Key ID: 5AC5F572E5D410AF

@ -0,0 +1,15 @@
diff --git a/src/lib.rs b/src/lib.rs
index 154426b..ff9d4fe 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -70,7 +70,10 @@ use std::io::{self, BufRead};
/// let data = Data { byte: 0x1F, word: 0xABCD, big: !0 };
/// data.hash(&mut adler);
///
+/// #[cfg(target_endian = "little")]
/// assert_eq!(adler.checksum(), 0x33410990);
+/// #[cfg(target_endian = "big")]
+/// assert_eq!(adler.checksum(), 0x331F0990);
/// ```
///
/// [`new`]: #method.new

@ -6,7 +6,7 @@
Name: rust-%{crate}
Version: 1.0.1
Release: 1%{?dist}
Release: 2%{?dist}
Summary: Simple clean-room implementation of the Adler-32 checksum
# Upstream license specification: 0BSD OR MIT OR Apache-2.0
@ -14,6 +14,10 @@ License: 0BSD or MIT or ASL 2.0
URL: https://crates.io/crates/adler
Source: %{crates_source}
# https://github.com/jonas-schievink/adler/issues/8
# patch a doc test that depends on byte order
Patch1: 0001-fix-endianness-in-doctests.patch
ExclusiveArch: %{rust_arches}
%if %{__cargo_skip_build}
BuildArch: noarch
@ -83,6 +87,9 @@ which use "std" feature of "%{crate}" crate.
%endif
%changelog
* Thu Feb 25 2021 Fabio Valentini <decathorpe@gmail.com> - 1.0.1-2
- Patch a doc test that depends on byte order.
* Thu Feb 25 2021 Fabio Valentini <decathorpe@gmail.com> - 1.0.1-1
- Update to version 1.0.1.
- Fixes RHBZ#1895724

Loading…
Cancel
Save