summaryrefslogtreecommitdiff
path: root/tests/test_matching.cc
diff options
context:
space:
mode:
authorDaniel Burrows <dburrows@debian.org>2008-09-04 20:44:31 -0700
committerDaniel Burrows <dburrows@debian.org>2008-09-04 20:44:31 -0700
commit452e6f9df985dad69aca376b72454f5cf5dec923 (patch)
tree34aea6c3ca00970b84ac2b0ac8306c02ec68cff2 /tests/test_matching.cc
parent45c62548920abe3ea4b76b292db59e60b61f13c4 (diff)
downloadaptitude-452e6f9df985dad69aca376b72454f5cf5dec923.tar.gz
Add tests for the ?provides term.
Diffstat (limited to 'tests/test_matching.cc')
-rw-r--r--tests/test_matching.cc8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/test_matching.cc b/tests/test_matching.cc
index 6b42039e..4b957a52 100644
--- a/tests/test_matching.cc
+++ b/tests/test_matching.cc
@@ -379,6 +379,8 @@ namespace
{ "~F", "?false", pattern::make_false() },
+ // No test for ?for; it was tested above.
+
{ "?garbage asdf", "?garbage ?name(\"asdf\")",
pattern::make_and(pattern::make_garbage(),
pattern::make_name("asdf")) },
@@ -445,6 +447,12 @@ namespace
{ "~O Debian", "?origin(\"Debian\")",
pattern::make_origin("Debian") },
+
+ { "?provides(?true)", "?provides(?true)",
+ pattern::make_provides(pattern::make_true()) },
+
+ { "~P ?true", "?provides(?true)",
+ pattern::make_provides(pattern::make_true()) },
};
const int num_test_patterns = sizeof(test_patterns) / sizeof(test_patterns[0]);