[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
02/138: tests: Add failing tests for changed-inputs on new style inputs.
From: |
guix-commits |
Subject: |
02/138: tests: Add failing tests for changed-inputs on new style inputs. |
Date: |
Wed, 5 Jan 2022 15:24:37 -0500 (EST) |
rekado pushed a commit to branch master
in repository guix.
commit 6226df77ee7448ba4eae05c14aa2ba9721f28bb4
Author: Ricardo Wurmus <rekado@elephly.net>
AuthorDate: Tue Jan 4 21:39:18 2022 +0100
tests: Add failing tests for changed-inputs on new style inputs.
* tests/upstream.scm ("changed-inputs returns changes to plain input list",
"changed-inputs returns changes to all plain input lists"): New tests.
---
tests/upstream.scm | 68 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 68 insertions(+)
diff --git a/tests/upstream.scm b/tests/upstream.scm
index 594334304a..9aacb77229 100644
--- a/tests/upstream.scm
+++ b/tests/upstream.scm
@@ -142,4 +142,72 @@
'("hello" "sed" "tar" "grep"))))
(else (pk else #false)))))
+(define test-new-package
+ (package
+ (inherit test-package)
+ (inputs
+ (list hello))
+ (native-inputs
+ (list sed tar))
+ (propagated-inputs
+ (list grep))))
+
+(define test-new-package-sexp
+ '(package
+ (name "test")
+ (version "2.10")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "mirror://gnu/hello/hello-" version
+ ".tar.gz"))
+ (sha256
+ (base32
+ "0ssi1wpaf7plaswqqjwigppsg5fyh99vdlb9kzl7c9lng89ndq1i"))))
+ (build-system gnu-build-system)
+ (inputs
+ (list hello))
+ (native-inputs
+ (list sed tar))
+ (propagated-inputs
+ (list grep))
+ (home-page "http://localhost")
+ (synopsis "test")
+ (description "test")
+ (license license:gpl3+)))
+
+(test-assert "changed-inputs returns changes to plain input list"
+ (let ((changes (changed-inputs
+ (package
+ (inherit test-new-package)
+ (inputs (list hello sed)))
+ test-new-package-sexp)))
+ (match changes
+ ;; Exactly one change
+ (((? upstream-input-change? item))
+ (and (equal? (upstream-input-change-type item)
+ 'regular)
+ (equal? (upstream-input-change-action item)
+ 'remove)
+ (string=? (upstream-input-change-name item)
+ "sed")))
+ (else (pk else #false)))))
+
+(test-assert "changed-inputs returns changes to all plain input lists"
+ (let ((changes (changed-inputs
+ (package
+ (inherit test-new-package)
+ (inputs '())
+ (native-inputs '())
+ (propagated-inputs '()))
+ test-new-package-sexp)))
+ (match changes
+ (((? upstream-input-change? items) ...)
+ (and (equal? (map upstream-input-change-type items)
+ '(regular native native propagated))
+ (equal? (map upstream-input-change-action items)
+ '(add add add add))
+ (equal? (map upstream-input-change-name items)
+ '("hello" "sed" "tar" "grep"))))
+ (else (pk else #false)))))
+
(test-end)
- 32/138: gnu: r-tinytex: Update to 0.36., (continued)
- 32/138: gnu: r-tinytex: Update to 0.36., guix-commits, 2022/01/05
- 30/138: gnu: r-venndiagram: Update to 1.7.1., guix-commits, 2022/01/05
- 36/138: gnu: r-dtplyr: Update to 1.2.0., guix-commits, 2022/01/05
- 37/138: gnu: r-renv: Update to 0.15.0., guix-commits, 2022/01/05
- 53/138: gnu: r-ncdf4: Update to 1.19., guix-commits, 2022/01/05
- 01/138: tests: Add tests for changed-inputs on old-style inputs., guix-commits, 2022/01/05
- 05/138: gnu: r-openssl: Use openssl instead of libressl., guix-commits, 2022/01/05
- 12/138: gnu: r-brio: Update to 1.1.3., guix-commits, 2022/01/05
- 08/138: gnu: r-activedriverwgs: Update to 1.0.3., guix-commits, 2022/01/05
- 09/138: gnu: Add r-matrixextra., guix-commits, 2022/01/05
- 02/138: tests: Add failing tests for changed-inputs on new style inputs.,
guix-commits <=
- 16/138: gnu: r-ggpp: Update to 0.4.3., guix-commits, 2022/01/05
- 21/138: gnu: r-pkgbuild: Update to 1.3.1., guix-commits, 2022/01/05
- 20/138: gnu: r-glue: Update to 1.6.0., guix-commits, 2022/01/05
- 29/138: gnu: r-hardyweinberg: Update to 1.7.4., guix-commits, 2022/01/05
- 35/138: gnu: r-openxlsx: Update to 4.2.5., guix-commits, 2022/01/05
- 33/138: gnu: r-ttr: Update to 0.24.3., guix-commits, 2022/01/05
- 31/138: gnu: r-xfun: Update to 0.29., guix-commits, 2022/01/05
- 41/138: gnu: r-argparse: Update to 2.1.3., guix-commits, 2022/01/05
- 43/138: gnu: r-abundant: Update to 1.2., guix-commits, 2022/01/05
- 44/138: gnu: r-multcomp: Update to 1.4-18., guix-commits, 2022/01/05