Add characterisation test for exiv2::urlencode

This commit is contained in:
Luis Díaz Más 2017-11-28 17:28:54 +01:00
parent 171c7970f9
commit fd5f131f4e

View File

@ -53,3 +53,10 @@ TEST(getEnv, throwsWhenKeyDoesNotExist)
// works.
ASSERT_THROW(getEnv(static_cast<EnVar>(3)), std::exception);
}
TEST(urlencode, encodesGivenUrl)
{
char *url = urlencode("http://www.geekhideout.com/urlcode.shtml");
ASSERT_STREQ("http%3a%2f%2fwww.geekhideout.com%2furlcode.shtml", url);
free(url);
}