From 003fb46d2ec3ce3bc8e3efb391485efa8c67efeb Mon Sep 17 00:00:00 2001 From: Igor Gnatenko Date: Fri, 6 Dec 2019 17:22:56 +0100 Subject: [PATCH] Fix tests with new toml Signed-off-by: Igor Gnatenko --- ...s-handle-test-output-from-toml-0.5.3.patch | 34 +++++++++++++++++++ rust-version-sync.spec | 7 +++- 2 files changed, 40 insertions(+), 1 deletion(-) create mode 100644 0001-markdown_deps-handle-test-output-from-toml-0.5.3.patch diff --git a/0001-markdown_deps-handle-test-output-from-toml-0.5.3.patch b/0001-markdown_deps-handle-test-output-from-toml-0.5.3.patch new file mode 100644 index 0000000..ace2d1b --- /dev/null +++ b/0001-markdown_deps-handle-test-output-from-toml-0.5.3.patch @@ -0,0 +1,34 @@ +From 33dc77fda8c5d993abee4e6c31c7526408877003 Mon Sep 17 00:00:00 2001 +From: Martin Geisler +Date: Wed, 11 Sep 2019 11:17:36 +0100 +Subject: [PATCH] markdown_deps: handle test output from toml 0.5.3 + +The latest minor version of the toml crate seems to give more detailed +error output. +--- + src/markdown_deps.rs | 9 +++++---- + 1 file changed, 5 insertions(+), 4 deletions(-) + +diff --git a/src/markdown_deps.rs b/src/markdown_deps.rs +index 00ca12b..a557c1c 100644 +--- a/src/markdown_deps.rs ++++ b/src/markdown_deps.rs +@@ -276,10 +276,11 @@ mod tests { + let block = "[dependencies]\n\ + foobar = 1.5.8"; + let request = extract_version_request("foobar", block); +- assert_eq!( +- request.unwrap_err(), +- "TOML parse error: expected newline, found a period at line 2" +- ); ++ // toml 0.5.3 returns "found a period at line 2 column 13. ++ // Update the test when we bump the toml crate dependency. ++ assert!(request ++ .unwrap_err() ++ .contains("TOML parse error: expected newline, found a period at line 2")); + } + + #[test] +-- +2.24.0 + diff --git a/rust-version-sync.spec b/rust-version-sync.spec index 15b37c9..0aadd27 100644 --- a/rust-version-sync.spec +++ b/rust-version-sync.spec @@ -6,7 +6,7 @@ Name: rust-%{crate} Version: 0.8.1 -Release: 4%{?dist} +Release: 5%{?dist} Summary: Simple crate for ensuring that version numbers in README files are updated when the crate version changes # Upstream license specification: MIT @@ -16,6 +16,8 @@ Source: %{crates_source} # Initial patched metadata # - Bump pulldown-cmark to 0.6, https://github.com/mgeisler/version-sync/pull/79 Patch0: version-sync-fix-metadata.diff +# * Fix tests with toml 0.5.3+, https://github.com/mgeisler/version-sync/commit/33dc77fda8c5d993abee4e6c31c7526408877003 +Patch0001: 0001-markdown_deps-handle-test-output-from-toml-0.5.3.patch ExclusiveArch: %{rust_arches} %if %{__cargo_skip_build} @@ -75,6 +77,9 @@ which use "default" feature of "%{crate}" crate. %endif %changelog +* Fri Dec 06 2019 Igor Gnatenko - 0.8.1-5 +- Fix tests with new toml + * Fri Sep 13 19:03:49 CEST 2019 Robert-André Mauchin - 0.8.1-4 - Bump pulldown-cmark to 0.6