diff options
author | Ludovic Courtès <ludo@gnu.org> | 2021-11-11 00:10:44 +0100 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2021-11-11 00:14:31 +0100 |
commit | 3756ce32674139376bcf11dac96bc562582088f7 (patch) | |
tree | 63bbe4e1536425e9be90f113b90de9e60ca63e8c /tests | |
parent | b2ed40c29f578d46d42cb1c5e99bd797cea3aba0 (diff) | |
download | guix-3756ce32674139376bcf11dac96bc562582088f7.tar.gz |
import: print: Replace packages and origins in 'arguments'.
* guix/import/print.scm (package->code)[variable-reference] [object->code]: New procedures. [package-lists->code]: Rewrite in terms of 'object->code'. Pass the 'arguments' field through 'object->code'. * tests/print.scm (pkg-with-arguments, pkg-with-arguments-source): New variables. ("package with arguments"): New test.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/print.scm | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/tests/print.scm b/tests/print.scm index ff0db469ab..1527251b01 100644 --- a/tests/print.scm +++ b/tests/print.scm @@ -120,6 +120,25 @@ (description "This is a dummy package.") (license license:gpl3+))) +(define-with-source pkg-with-arguments pkg-with-arguments-source + (package + (name "test") + (version "1.2.3") + (source (origin + (method url-fetch) + (uri (string-append "file:///tmp/test-" + version ".tar.gz")) + (sha256 + (base32 + "070pwb7brdcn1mfvplkd56vjc7lbz4iznzkqvfsakvgbv68k71ah")))) + (build-system (@ (guix build-system gnu) gnu-build-system)) + (arguments + `(#:disallowed-references (,(@ (gnu packages base) coreutils)))) + (home-page "http://gnu.org") + (synopsis "Dummy") + (description "This is a dummy package.") + (license license:gpl3+))) + (test-equal "simple package" `(define-public test ,pkg-source) (package->code pkg)) @@ -136,4 +155,8 @@ `(define-public test ,pkg-with-origin-patch-source) (package->code pkg-with-origin-patch)) +(test-equal "package with arguments" + `(define-public test ,pkg-with-arguments-source) + (package->code pkg-with-arguments)) + (test-end "print") |