container: root: test: unit: common: PluggablePath: add case for invalid characters

This commit is contained in:
2025-12-23 11:02:26 -08:00
parent 8bc6477c27
commit 736a71e9d1

View File

@@ -564,6 +564,25 @@ TEST_F(PluggablePath, InvalidFamily)
Path path("custom/incomplete/incomplete"), common::type::RuntimeError);
}
TEST_F(PluggablePath, InvalidCharacters)
{
ASSERT_THROW(Path path("repo/no spaces/a.file"), common::type::RuntimeError);
ASSERT_THROW(
Path path("custom/no spaces/a.file"), common::type::RuntimeError);
ASSERT_THROW(Path path("repo/'no_ticks'/a.file"), common::type::RuntimeError);
ASSERT_THROW(
Path path("custom/'no_ticks'/a.file"), common::type::RuntimeError);
ASSERT_THROW(Path path("repo/any/@a.file"), common::type::RuntimeError);
ASSERT_THROW(Path path("custom/any/@a.file"), common::type::RuntimeError);
ASSERT_THROW(
Path path("repo/bad\\ slash/a.file"), common::type::RuntimeError);
ASSERT_THROW(
Path path("custom/bad\\ slash/a.file"), common::type::RuntimeError);
}
TEST_F(PluggablePath, Base)
{
ASSERT_EQ(m_repo().repo(), kRepoBase);