diff --git a/container/src/root/test/unit/utility.hh b/container/src/root/test/unit/utility.hh index 96791a9..ce9f42e 100644 --- a/container/src/root/test/unit/utility.hh +++ b/container/src/root/test/unit/utility.hh @@ -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);