| 11 | BOOST_AUTO_TEST_SUITE(remote_configpackageutility) |
| 12 | |
| 13 | BOOST_AUTO_TEST_CASE(ValidateName) |
| 14 | { |
| 15 | std::vector<std::string> validNames {"foo", "foo-bar", "FooBar", "Foo123", "_Foo-", "123bar"}; |
| 16 | for (const std::string& n : validNames) { |
| 17 | BOOST_CHECK_MESSAGE(ConfigPackageUtility::ValidatePackageName(n), "'" << n << "' should be valid"); |
| 18 | } |
| 19 | |
| 20 | std::vector<std::string> invalidNames {"", ".", "..", "foo.bar", "foo/../bar", "foo/bar", "foo:bar"}; |
| 21 | for (const std::string& n : invalidNames) { |
| 22 | BOOST_CHECK_MESSAGE(!ConfigPackageUtility::ValidatePackageName(n), "'" << n << "' should not be valid"); |
| 23 | } |
| 24 | } |
| 25 | |
| 26 | BOOST_AUTO_TEST_SUITE_END() |
nothing calls this directly
no outgoing calls
no test coverage detected