Add test for space trimming in tags.
continuous-integration/drone/push Build is failing Details

This commit is contained in:
tastytea 2020-07-14 17:30:36 +02:00
parent d4e037670f
commit 463a8792f0
Signed by: tastytea
GPG Key ID: CFC39497F1B26E07
1 changed files with 22 additions and 0 deletions

View File

@ -126,6 +126,28 @@ SCENARIO("string_to_vector()")
}
}
}
{
const string str{"a, b,c , d ,e"};
WHEN("string is \"" + str + '"')
{
try
{
vec = cgi::string_to_vector(str);
}
catch (std::exception &)
{
exception = true;
}
THEN("No exception is thrown")
AND_THEN(R"(vector is {"a", "b", "c", "d", "e"})")
{
REQUIRE_FALSE(exception);
REQUIRE(vec == vector<string>{"a", "b", "c", "d", "e"});
}
}
}
}
} // namespace FediBlock