From 250119362e44599aad7e75462fa4298ad1ab1ad9 Mon Sep 17 00:00:00 2001 From: Julian Andres Klode Date: Tue, 28 Jan 2020 22:38:46 +0100 Subject: patterns: Parse sequence of patterns as ?and --- test/libapt/pattern_test.cc | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'test') 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)"); + } -- cgit v1.2.3