Commit 8fc26a4d authored by Sébastien Wilmet's avatar Sébastien Wilmet

testsuite: test _gspell_utils_is_number()

parent b71a5201
......@@ -19,6 +19,27 @@
#include "gspell/gspell-utils.h"
static void
test_is_number (void)
{
gboolean is_number;
is_number = _gspell_utils_is_number ("123", -1);
g_assert (is_number);
is_number = _gspell_utils_is_number ("123", 3);
g_assert (is_number);
is_number = _gspell_utils_is_number ("123a4", 3);
g_assert (is_number);
is_number = _gspell_utils_is_number ("123a4", -1);
g_assert (!is_number);
is_number = _gspell_utils_is_number ("h4ck1ng", -1);
g_assert (!is_number);
}
static void
test_str_replace (void)
{
......@@ -86,6 +107,7 @@ main (gint argc,
{
gtk_test_init (&argc, &argv);
g_test_add_func ("/utils/is_number", test_is_number);
g_test_add_func ("/utils/str_replace", test_str_replace);
g_test_add_func ("/utils/str_to_ascii_apostrophe", test_str_to_ascii_apostrophe);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment