summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2024-10-07 18:20:34 +0100
committerDan Goodliffe <dan@randomdan.homeip.net>2024-10-07 18:20:34 +0100
commita82e565d7f426f6bdd4acd4e07ac5ba07d504d17 (patch)
tree4431054935782ad05f9ade80475787d35ca42263
parentAdd project name (diff)
downloadgentoobrowse-api-main.tar.bz2
gentoobrowse-api-main.tar.xz
gentoobrowse-api-main.zip
Accept + in USE flag name of dependency stringHEADgentoobrowse-api-0.12.4.1main
-rw-r--r--gentoobrowse-api/service/depend.cpp2
-rw-r--r--gentoobrowse-api/unittests/testDepend.cpp9
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 )");