From 3c8c38ed14efaf8929f84bc98ac977f896e74833 Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Wed, 2 Aug 2023 20:03:45 +0300 Subject: [PATCH] gnu: Add rust-test-case-3. * gnu/packages/crates-io.scm (rust-test-case-3): New variable. (rust-test-case-2): Inherit from rust-test-case-3. --- gnu/packages/crates-io.scm | 44 ++++++++++++++++++++++++++++---------- 1 file changed, 33 insertions(+), 11 deletions(-) diff --git a/gnu/packages/crates-io.scm b/gnu/packages/crates-io.scm index bf8c21abe9..7a7fcd66b2 100644 --- a/gnu/packages/crates-io.scm +++ b/gnu/packages/crates-io.scm @@ -67167,8 +67167,40 @@ (define-public rust-test-assembler-0.1 streams.") (license license:expat))) +(define-public rust-test-case-3 + (package + (name "rust-test-case") + (version "3.1.0") + (source (origin + (method url-fetch) + (uri (crate-uri "test-case" version)) + (file-name (string-append name "-" version ".tar.gz")) + (sha256 + (base32 + "1pr53g4x6gykfj4hvffivyd0aa0hj9pbfr87y8908sskvrxnw79a")))) + (build-system cargo-build-system) + (arguments + `(#:tests? #f ; Not all test files included. + #:cargo-inputs + (("rust-regex" ,rust-regex-1) + ("rust-test-case-macros" ,rust-test-case-macros-3)) + #:cargo-development-inputs + (("rust-insta" ,rust-insta-1) + ("rust-itertools" ,rust-itertools-0.10) + ("rust-regex" ,rust-regex-1)))) + (home-page "https://github.com/frondeus/test-case") + (synopsis "Procedural macro attribute for parametrized test cases") + (description + "This crate provides @code{#[test_case]} procedural macro attribute that +generates multiple parametrized tests using one body with different input +parameters. A test is generated for each data set passed in test_case +attribute. Under the hood, all test cases that share same body are grouped +into mod, giving clear and readable test results.") + (license license:expat))) + (define-public rust-test-case-2 (package + (inherit rust-test-case-3) (name "rust-test-case") (version "2.2.2") (source (origin @@ -67182,7 +67214,6 @@ (define-public rust-test-case-2 '(begin (substitute* "Cargo.toml" (("=([[:digit:]]+\\.[[:digit:]]+\\.[[:digit:]]+)" _ version) (string-append "^" version))))))) - (build-system cargo-build-system) (arguments `(#:tests? #f ; Not all files included. #:cargo-inputs @@ -67195,16 +67226,7 @@ (define-public rust-test-case-2 ("rust-linked-hash-map" ,rust-linked-hash-map-0.5) ("rust-once-cell" ,rust-once-cell-1) ("rust-regex" ,rust-regex-1) - ("rust-serde-yaml" ,rust-serde-yaml-0.8)))) - (home-page "https://github.com/frondeus/test-case") - (synopsis "Procedural macro attribute for parametrized test cases") - (description - "This crate provides @code{#[test_case]} procedural macro attribute that -generates multiple parametrized tests using one body with different input -parameters. A test is generated for each data set passed in test_case -attribute. Under the hood, all test cases that share same body are grouped -into mod, giving clear and readable test results.") - (license license:expat))) + ("rust-serde-yaml" ,rust-serde-yaml-0.8)))))) (define-public rust-test-case-1 (package