summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorJulian Andres Klode <julian.klode@canonical.com>2020-01-28 22:38:46 +0100
committerJulian Andres Klode <julian.klode@canonical.com>2020-02-03 12:55:54 +0100
commit250119362e44599aad7e75462fa4298ad1ab1ad9 (patch)
tree8dc35269b74db8d099d8638866c404fc7c00d0bb /test
parentebe5f39bfbb64921d5d31e0a6e49287356a5e6e2 (diff)
patterns: Parse sequence of patterns as ?and
Diffstat (limited to 'test')
-rw-r--r--test/libapt/pattern_test.cc8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/libapt/pattern_test.cc b/test/libapt/pattern_test.cc
index 7fc6a1f8f..00d356d47 100644
--- a/test/libapt/pattern_test.cc
+++ b/test/libapt/pattern_test.cc
@@ -176,4 +176,12 @@ TEST(TreeParserTest, ParseShortPattern)
caught = true;
};
EXPECT_TRUE(caught) << "!X should have thrown an exception";
+
+ EXPECT_PATTERN_EQ("?a?b", "?and(?a, ?b)");
+ EXPECT_PATTERN_EQ("~T~F", "?and(?true, ?false)");
+ EXPECT_PATTERN_EQ("~T ~F", "?and(?true, ?false)");
+ EXPECT_PATTERN_EQ("~T !~F", "?and(?true, ?not(?false))");
+ EXPECT_PATTERN_EQ("!~F ~T", "?and(?not(?false), ?true)");
+ EXPECT_PATTERN_EQ("!~F~T", "?and(?not(?false), ?true)");
+
}