aboutsummaryrefslogtreecommitdiff
path: root/paludis/portage_dep_parser_TEST.cc
diff options
context:
space:
mode:
Diffstat (limited to 'paludis/portage_dep_parser_TEST.cc')
-rw-r--r--paludis/portage_dep_parser_TEST.cc40
1 files changed, 20 insertions, 20 deletions
diff --git a/paludis/portage_dep_parser_TEST.cc b/paludis/portage_dep_parser_TEST.cc
index 7be43c328..5469fbe01 100644
--- a/paludis/portage_dep_parser_TEST.cc
+++ b/paludis/portage_dep_parser_TEST.cc
@@ -43,7 +43,7 @@ namespace test_cases
void run()
{
DepSpecPrettyPrinter d(0, false);
- PortageDepParser::parse("")->accept(&d);
+ PortageDepParser::parse_depend("", pds_pm_permissive)->accept(&d);
TEST_CHECK_EQUAL(stringify(d), "( ) ");
}
} test_dep_spec_parser_empty;
@@ -59,7 +59,7 @@ namespace test_cases
void run()
{
DepSpecPrettyPrinter d(0, false);
- PortageDepParser::parse(" \n \t")->accept(&d);
+ PortageDepParser::parse_depend(" \n \t", pds_pm_permissive)->accept(&d);
TEST_CHECK_EQUAL(stringify(d), "( ) ");
}
} test_dep_spec_parser_blank;
@@ -75,7 +75,7 @@ namespace test_cases
void run()
{
DepSpecPrettyPrinter d(0, false);
- PortageDepParser::parse("app-editors/vim")->accept(&d);
+ PortageDepParser::parse_depend("app-editors/vim", pds_pm_permissive)->accept(&d);
TEST_CHECK_EQUAL(stringify(d), "( app-editors/vim ) ");
}
} test_dep_spec_parser_package;
@@ -91,15 +91,15 @@ namespace test_cases
void run()
{
DepSpecPrettyPrinter d1(0, false);
- PortageDepParser::parse(">=app-editors/vim-6.4_alpha")->accept(&d1);
+ PortageDepParser::parse_depend(">=app-editors/vim-6.4_alpha", pds_pm_permissive)->accept(&d1);
TEST_CHECK_EQUAL(stringify(d1), "( >=app-editors/vim-6.4_alpha ) ");
DepSpecPrettyPrinter d2(0, false);
- PortageDepParser::parse("=app-editors/vim-6.4_alpha-r1")->accept(&d2);
+ PortageDepParser::parse_depend("=app-editors/vim-6.4_alpha-r1", pds_pm_permissive)->accept(&d2);
TEST_CHECK_EQUAL(stringify(d2), "( =app-editors/vim-6.4_alpha-r1 ) ");
DepSpecPrettyPrinter d3(0, false);
- PortageDepParser::parse(">=app-editors/vim-6.4_alpha:one")->accept(&d3);
+ PortageDepParser::parse_depend(">=app-editors/vim-6.4_alpha:one", pds_pm_permissive)->accept(&d3);
TEST_CHECK_EQUAL(stringify(d3), "( >=app-editors/vim-6.4_alpha:one ) ");
}
} test_dep_spec_parser_decorated_package;
@@ -115,7 +115,7 @@ namespace test_cases
void run()
{
DepSpecPrettyPrinter d(0, false);
- PortageDepParser::parse("app-editors/vim app-misc/hilite \nsys-apps/findutils")->accept(&d);
+ PortageDepParser::parse_depend("app-editors/vim app-misc/hilite \nsys-apps/findutils", pds_pm_permissive)->accept(&d);
TEST_CHECK_EQUAL(stringify(d), "( app-editors/vim app-misc/hilite sys-apps/findutils ) ");
}
} test_dep_spec_parser_packages;
@@ -131,7 +131,7 @@ namespace test_cases
void run()
{
DepSpecPrettyPrinter d(0, false);
- PortageDepParser::parse("|| ( one/one two/two )")->accept(&d);
+ PortageDepParser::parse_depend("|| ( one/one two/two )", pds_pm_permissive)->accept(&d);
TEST_CHECK_EQUAL(stringify(d), "( || ( one/one two/two ) ) ");
}
} test_dep_spec_parser_any;
@@ -147,7 +147,7 @@ namespace test_cases
void run()
{
DepSpecPrettyPrinter d(0, false);
- PortageDepParser::parse(" ( one/one two/two ) ")->accept(&d);
+ PortageDepParser::parse_depend(" ( one/one two/two ) ", pds_pm_permissive)->accept(&d);
TEST_CHECK_EQUAL(stringify(d), "( ( one/one two/two ) ) ");
}
} test_dep_spec_parser_all;
@@ -163,7 +163,7 @@ namespace test_cases
void run()
{
DepSpecPrettyPrinter d(0, false);
- PortageDepParser::parse("foo? ( one/one )")->accept(&d);
+ PortageDepParser::parse_depend("foo? ( one/one )", pds_pm_permissive)->accept(&d);
TEST_CHECK_EQUAL(stringify(d), "( foo? ( one/one ) ) ");
}
} test_dep_spec_parser_use;
@@ -179,7 +179,7 @@ namespace test_cases
void run()
{
DepSpecPrettyPrinter d(0, false);
- PortageDepParser::parse("!foo? ( one/one )")->accept(&d);
+ PortageDepParser::parse_depend("!foo? ( one/one )", pds_pm_permissive)->accept(&d);
TEST_CHECK_EQUAL(stringify(d), "( !foo? ( one/one ) ) ");
}
} test_dep_spec_parser_inv_use;
@@ -195,11 +195,11 @@ namespace test_cases
void run()
{
DepSpecPrettyPrinter d(0, false);
- TEST_CHECK_THROWS(PortageDepParser::parse("!foo? ( one/one")->accept(&d), DepStringError);
- TEST_CHECK_THROWS(PortageDepParser::parse("!foo? ( one/one ) )")->accept(&d), DepStringError);
- TEST_CHECK_THROWS(PortageDepParser::parse("( ( ( ) )")->accept(&d), DepStringError);
- TEST_CHECK_THROWS(PortageDepParser::parse("( ( ( ) ) ) )")->accept(&d), DepStringError);
- TEST_CHECK_THROWS(PortageDepParser::parse(")")->accept(&d), DepStringError);
+ TEST_CHECK_THROWS(PortageDepParser::parse_depend("!foo? ( one/one", pds_pm_permissive)->accept(&d), DepStringError);
+ TEST_CHECK_THROWS(PortageDepParser::parse_depend("!foo? ( one/one ) )", pds_pm_permissive)->accept(&d), DepStringError);
+ TEST_CHECK_THROWS(PortageDepParser::parse_depend("( ( ( ) )", pds_pm_permissive)->accept(&d), DepStringError);
+ TEST_CHECK_THROWS(PortageDepParser::parse_depend("( ( ( ) ) ) )", pds_pm_permissive)->accept(&d), DepStringError);
+ TEST_CHECK_THROWS(PortageDepParser::parse_depend(")", pds_pm_permissive)->accept(&d), DepStringError);
}
} test_dep_spec_parser_bad_nesting;
@@ -214,10 +214,10 @@ namespace test_cases
void run()
{
DepSpecPrettyPrinter d(0, false);
- TEST_CHECK_THROWS(PortageDepParser::parse("!foo? ||")->accept(&d), DepStringError);
- TEST_CHECK_THROWS(PortageDepParser::parse("(((")->accept(&d), DepStringError);
- TEST_CHECK_THROWS(PortageDepParser::parse(")")->accept(&d), DepStringError);
- TEST_CHECK_THROWS(PortageDepParser::parse("(foo/bar)")->accept(&d), DepStringError);
+ TEST_CHECK_THROWS(PortageDepParser::parse_depend("!foo? ||", pds_pm_permissive)->accept(&d), DepStringError);
+ TEST_CHECK_THROWS(PortageDepParser::parse_depend("(((", pds_pm_permissive)->accept(&d), DepStringError);
+ TEST_CHECK_THROWS(PortageDepParser::parse_depend(")", pds_pm_permissive)->accept(&d), DepStringError);
+ TEST_CHECK_THROWS(PortageDepParser::parse_depend("(foo/bar)", pds_pm_permissive)->accept(&d), DepStringError);
}
} test_dep_spec_parser_bad_values;
}