diff options
author | Leo Famulari <leo@famulari.name> | 2017-01-13 10:21:17 -0500 |
---|---|---|
committer | Leo Famulari <leo@famulari.name> | 2017-01-13 10:21:17 -0500 |
commit | cc0725914e74c4c4dec369f3e7cdb6f201b3fecd (patch) | |
tree | e68b452ed625a2db8ed10914fb0968fdc36c655d /tests/scripts-build.scm | |
parent | a25b6880f1398ad36aea1d0e4e4105936a8b7e70 (diff) | |
parent | ce195ba12277ec4286ad0d8ddf7294655987ea9d (diff) |
Merge branch 'master' into python-tests
Diffstat (limited to 'tests/scripts-build.scm')
-rw-r--r-- | tests/scripts-build.scm | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/scripts-build.scm b/tests/scripts-build.scm index b324012806..a1f684c736 100644 --- a/tests/scripts-build.scm +++ b/tests/scripts-build.scm @@ -50,6 +50,19 @@ (add-to-store store "guix.scm" #t "sha256" s))))))) +(test-assert "options->transformation, with-source, replacement" + ;; Same, but this time the original package has a 'replacement' field. We + ;; expect that replacement to be set to #f in the new package. + (let* ((p (dummy-package "guix.scm" (replacement coreutils))) + (s (search-path %load-path "guix.scm")) + (t (options->transformation `((with-source . ,s))))) + (with-store store + (let ((new (t store p))) + (and (not (eq? new p)) + (string=? (package-source new) + (add-to-store store "guix.scm" #t "sha256" s)) + (not (package-replacement new))))))) + (test-assert "options->transformation, with-source, with version" ;; Our pseudo-package is called 'guix.scm' so the 'guix.scm-2.0' source ;; should be applicable, and its version should be extracted. |