summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/frontend/project/elements/format-deps.bst17
-rw-r--r--tests/frontend/show.py8
2 files changed, 21 insertions, 4 deletions
diff --git a/tests/frontend/project/elements/format-deps.bst b/tests/frontend/project/elements/format-deps.bst
new file mode 100644
index 000000000..58a46891b
--- /dev/null
+++ b/tests/frontend/project/elements/format-deps.bst
@@ -0,0 +1,17 @@
+kind: import
+
+description: >
+ It is important that this element has both and build and runtime dependencies.
+ It is also important that it has a dependency that is needed at both build
+ time and runtime.
+
+sources:
+- kind: local
+ path: files/etc-files
+
+depends:
+- import-links.bst
+build-depends:
+- import-dev.bst
+runtime-depends:
+- import-bin.bst
diff --git a/tests/frontend/show.py b/tests/frontend/show.py
index 17931ffe3..4be4b72e9 100644
--- a/tests/frontend/show.py
+++ b/tests/frontend/show.py
@@ -399,14 +399,14 @@ def test_exceed_max_recursion_depth(cli, tmpdir, dependency_depth):
@pytest.mark.parametrize(
"dep_kind, expected_deps",
[
- ("%{deps}", "[import-dev.bst, import-bin.bst]"),
- ("%{build-deps}", "[import-dev.bst]"),
- ("%{runtime-deps}", "[import-bin.bst]"),
+ ("%{deps}", "[import-dev.bst, import-links.bst, import-bin.bst]"),
+ ("%{build-deps}", "[import-dev.bst, import-links.bst]"),
+ ("%{runtime-deps}", "[import-links.bst, import-bin.bst]"),
],
)
def test_format_deps(cli, datafiles, dep_kind, expected_deps):
project = str(datafiles)
- target = "checkout-deps.bst"
+ target = "format-deps.bst"
result = cli.run(
project=project, silent=True, args=["show", "--deps", "none", "--format", "%{name}: " + dep_kind, target]
)