aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorMarius Bakke <mbakke@fastmail.com>2019-06-09 00:57:36 +0200
committerMarius Bakke <mbakke@fastmail.com>2019-06-09 00:57:36 +0200
commit69ecd666d73ebc5ee7a0be54f4e24f000d1d7e31 (patch)
tree80fc467b3129cd302aed02622dd497247a8c5bb0 /tests
parent4bed3b101253e5f82c6423f0eb55b307ec839f53 (diff)
parentc6de5afe5c5da34513ea43b041fead30f28f57d4 (diff)
downloadpatches-69ecd666d73ebc5ee7a0be54f4e24f000d1d7e31.tar
patches-69ecd666d73ebc5ee7a0be54f4e24f000d1d7e31.tar.gz
Merge branch 'master' into staging
Diffstat (limited to 'tests')
-rw-r--r--tests/print.scm48
1 files changed, 31 insertions, 17 deletions
diff --git a/tests/print.scm b/tests/print.scm
index 305807c1d1..d4b2cca93f 100644
--- a/tests/print.scm
+++ b/tests/print.scm
@@ -24,9 +24,31 @@
#:use-module (guix licenses)
#:use-module (srfi srfi-64))
+(define-syntax-rule (define-with-source object source expr)
+ (begin
+ (define object expr)
+ (define source 'expr)))
+
(test-begin "print")
-(define pkg
+(define-with-source pkg pkg-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 gnu-build-system)
+ (home-page "http://gnu.org")
+ (synopsis "Dummy")
+ (description "This is a dummy package.")
+ (license gpl3+)))
+
+(define-with-source pkg-with-inputs pkg-with-inputs-source
(package
(name "test")
(version "1.2.3")
@@ -38,27 +60,19 @@
(base32
"070pwb7brdcn1mfvplkd56vjc7lbz4iznzkqvfsakvgbv68k71ah"))))
(build-system gnu-build-system)
+ (inputs `(("coreutils" ,(@ (gnu packages base) coreutils))
+ ("glibc" ,(@ (gnu packages base) glibc) "debug")))
(home-page "http://gnu.org")
(synopsis "Dummy")
(description "This is a dummy package.")
(license gpl3+)))
(test-equal "simple package"
- (package->code pkg)
- '(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 gnu-build-system)
- (home-page "http://gnu.org")
- (synopsis "Dummy")
- (description "This is a dummy package.")
- (license gpl3+)))
+ pkg-source
+ (package->code pkg))
+
+(test-equal "package with inputs"
+ pkg-with-inputs-source
+ (package->code pkg-with-inputs))
(test-end "print")