aboutsummaryrefslogtreecommitdiff
path: root/tests/packages.scm
diff options
context:
space:
mode:
Diffstat (limited to 'tests/packages.scm')
-rw-r--r--tests/packages.scm34
1 files changed, 34 insertions, 0 deletions
diff --git a/tests/packages.scm b/tests/packages.scm
index 9ec4dd1928..2e1ca10dc4 100644
--- a/tests/packages.scm
+++ b/tests/packages.scm
@@ -2,6 +2,7 @@
;;; Copyright © 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2018 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
;;; Copyright © 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com>
+;;; Copyright © 2021 Maxime Devos <maximedevos@telenet.be>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -1864,6 +1865,39 @@
(package-location (specification->package "guile@2"))
(specification->location "guile@2"))
+(test-eq "this-package-input, exists"
+ hello
+ (package-arguments
+ (dummy-package "a"
+ (inputs `(("hello" ,hello)))
+ (arguments (this-package-input "hello")))))
+
+(test-eq "this-package-input, exists in propagated-inputs"
+ hello
+ (package-arguments
+ (dummy-package "a"
+ (propagated-inputs `(("hello" ,hello)))
+ (arguments (this-package-input "hello")))))
+
+(test-eq "this-package-input, does not exist"
+ #f
+ (package-arguments
+ (dummy-package "a"
+ (arguments (this-package-input "hello")))))
+
+(test-eq "this-package-native-input, exists"
+ hello
+ (package-arguments
+ (dummy-package "a"
+ (native-inputs `(("hello" ,hello)))
+ (arguments (this-package-native-input "hello")))))
+
+(test-eq "this-package-native-input, does not exists"
+ #f
+ (package-arguments
+ (dummy-package "a"
+ (arguments (this-package-native-input "hello")))))
+
(test-end "packages")
;;; Local Variables: