Bump rustc-test to 0.3

Signed-off-by: Igor Gnatenko <ignatenkobrain@fedoraproject.org>
epel9
Igor Gnatenko 7 years ago
parent f53df0eda8
commit c6bc5528f6
No known key found for this signature in database
GPG Key ID: 695714BD1BBC5F4C

@ -0,0 +1,43 @@
From 9d500e76a0e1644c93b3869588f979e4440e74d6 Mon Sep 17 00:00:00 2001
From: Simon Sapin <simon.sapin@exyr.org>
Date: Sun, 25 Feb 2018 08:21:55 +0100
Subject: [PATCH] Update to rustc_test 0.3, unbreak tests on nightly-2018-02-25
Version 0.2 of the crates.io package `rustc_test` uses `test` as its
rustc crate name, shadowing the `test` crate from the standard library.
This made up subject to breaking changes to its private APIs:
https://travis-ci.org/SimonSapin/run-nightly/builds/345808272#L549
---
idna/tests/tests.rs | 2 +-
idna/tests/uts46.rs | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/idna/tests/tests.rs b/idna/tests/tests.rs
index 8ca2185..808ad6b 100644
--- a/idna/tests/tests.rs
+++ b/idna/tests/tests.rs
@@ -1,6 +1,6 @@
extern crate idna;
extern crate rustc_serialize;
-extern crate test;
+extern crate rustc_test as test;
mod punycode;
mod uts46;
diff --git a/idna/tests/uts46.rs b/idna/tests/uts46.rs
index ddc8af9..59ec1cd 100644
--- a/idna/tests/uts46.rs
+++ b/idna/tests/uts46.rs
@@ -108,7 +108,7 @@ fn unescape(input: &str) -> String {
let c2 = chars.next().unwrap().to_digit(16).unwrap();
let c3 = chars.next().unwrap().to_digit(16).unwrap();
let c4 = chars.next().unwrap().to_digit(16).unwrap();
- match char::from_u32((((c1 * 16 + c2) * 16 + c3) * 16 + c4))
+ match char::from_u32(((c1 * 16 + c2) * 16 + c3) * 16 + c4)
{
Some(c) => output.push(c),
None => { output.push_str(&format!("\\u{:X}{:X}{:X}{:X}",c1,c2,c3,c4)); }
--
2.16.2

@ -0,0 +1,11 @@
--- idna-0.1.4/Cargo.toml 2017-07-13T18:21:49+02:00
+++ idna-0.1.4/Cargo.toml 2018-03-13T12:21:46.452973+01:00
@@ -18,7 +18,7 @@
name = "unit"
[dev-dependencies]
-rustc-test = "0.2"
+rustc-test = "0.3"
rustc-serialize = "0.3"
[dependencies]

@ -6,12 +6,17 @@
Name: rust-%{crate} Name: rust-%{crate}
Version: 0.1.4 Version: 0.1.4
Release: 3%{?dist} Release: 4%{?dist}
Summary: IDNA (Internationalizing Domain Names in Applications) and Punycode Summary: IDNA (Internationalizing Domain Names in Applications) and Punycode
License: MIT or ASL 2.0 License: MIT or ASL 2.0
URL: https://crates.io/crates/idna URL: https://crates.io/crates/idna
Source0: https://crates.io/api/v1/crates/%{crate}/%{version}/download#/%{crate}-%{version}.crate Source0: https://crates.io/api/v1/crates/%{crate}/%{version}/download#/%{crate}-%{version}.crate
# Initial patched metadata
# * Bump rustc-test to 0.3, https://github.com/servo/rust-url/commit/9d500e76a0e1644c93b3869588f979e4440e74d6
Patch0: idna-0.1.4-fix-metadata.diff
# Make it work with new rustc-test
Patch1: 0001-Update-to-rustc_test-0.3-unbreak-tests-on-nightly-20.patch
ExclusiveArch: %{rust_arches} ExclusiveArch: %{rust_arches}
@ -23,7 +28,7 @@ BuildRequires: (crate(unicode-normalization) >= 0.1.5 with crate(unicode-normal
%if %{with check} %if %{with check}
# [dev-dependencies] # [dev-dependencies]
BuildRequires: (crate(rustc-serialize) >= 0.3.0 with crate(rustc-serialize) < 0.4.0) BuildRequires: (crate(rustc-serialize) >= 0.3.0 with crate(rustc-serialize) < 0.4.0)
BuildRequires: (crate(rustc-test) >= 0.2.0 with crate(rustc-test) < 0.3.0) BuildRequires: (crate(rustc-test) >= 0.3.0 with crate(rustc-test) < 0.4.0)
%endif %endif
%description %description
@ -40,7 +45,9 @@ This package contains library source intended for building other packages
which use %{crate} from crates.io. which use %{crate} from crates.io.
%prep %prep
%autosetup -n %{crate}-%{version} -p1 %autosetup -n %{crate}-%{version} -N
%patch0 -p1
%patch1 -p2
%cargo_prep %cargo_prep
%build %build
@ -60,6 +67,9 @@ which use %{crate} from crates.io.
%exclude %{cargo_registry}/%{crate}-%{version}/src/{IdnaMappingTable.txt,make_uts46_mapping_table.py*} %exclude %{cargo_registry}/%{crate}-%{version}/src/{IdnaMappingTable.txt,make_uts46_mapping_table.py*}
%changelog %changelog
* Tue Mar 13 2018 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 0.1.4-4
- Bump rustc-test to 0.3
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.1.4-3 * Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.1.4-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild

Loading…
Cancel
Save