diff options
-rw-r--r-- | gentoobrowse-api/service/depend.cpp | 2 | ||||
-rw-r--r-- | gentoobrowse-api/unittests/testDepend.cpp | 9 |
2 files changed, 10 insertions, 1 deletions
diff --git a/gentoobrowse-api/service/depend.cpp b/gentoobrowse-api/service/depend.cpp index 4cfc1b4..179eea0 100644 --- a/gentoobrowse-api/service/depend.cpp +++ b/gentoobrowse-api/service/depend.cpp @@ -11,7 +11,7 @@ namespace Portage::Utils { AdHoc::Lexer::PatternPtr WhenUse_Begin( - AdHoc::LexerMatchers::regex(R"(\s*(!?[[:alnum:]_@-]+)\?\s*\(\s*)", G_REGEX_OPTIMIZE)); + AdHoc::LexerMatchers::regex(R"(\s*(!?[[:alnum:]_@+-]+)\?\s*\(\s*)", G_REGEX_OPTIMIZE)); AdHoc::Lexer::PatternPtr WhenUse_End(AdHoc::LexerMatchers::regex(R"(\s*\)\s*)", G_REGEX_OPTIMIZE)); AdHoc::Lexer::PatternPtr Or_Begin(AdHoc::LexerMatchers::regex(R"(\s*\|\|\s*\(\s*)", G_REGEX_OPTIMIZE)); AdHoc::Lexer::PatternPtr Or_Group(AdHoc::LexerMatchers::regex(R"(\s*\(\s*)", G_REGEX_OPTIMIZE)); diff --git a/gentoobrowse-api/unittests/testDepend.cpp b/gentoobrowse-api/unittests/testDepend.cpp index a02c87a..52a020f 100644 --- a/gentoobrowse-api/unittests/testDepend.cpp +++ b/gentoobrowse-api/unittests/testDepend.cpp @@ -293,6 +293,15 @@ BOOST_AUTO_TEST_CASE(wine_staging) BOOST_REQUIRE_EQUAL(ds.size(), 9); } +BOOST_AUTO_TEST_CASE(ccache) +{ + auto ds = Portage::Utils::Depend::parse( + ">=app-arch/zstd-1.3.4:= !static-c++? ( >=dev-cpp/cpp-httplib-0.10.6:= >=dev-libs/libfmt-8.0.0:= ) " + ">=dev-libs/blake3-1.4.0:= >=dev-libs/xxhash-0.8.0 redis? ( >=dev-libs/hiredis-0.13.3:= ) " + "dev-util/shadowman sys-apps/gentoo-functions"); + BOOST_REQUIRE_EQUAL(ds.size(), 8); +} + BOOST_AUTO_TEST_CASE(useWithAtSymble) { auto ds = Portage::Utils::Depend::parse("some@thing? ( app-arch/bzip2 )"); |