* tests: don't assume the whole lives in Helsinki, Finland

This commit is contained in:
Dirk-Jan C. Binnema
2011-07-21 08:20:10 +03:00
parent f0833ca315
commit 62616a2a2c
3 changed files with 12 additions and 9 deletions

View File

@ -408,10 +408,10 @@ test_mu_view_01 (void)
{
gchar *cmdline, *output, *tmpdir;
int len;
tmpdir = test_mu_common_get_random_tmpdir();
g_assert (g_mkdir_with_parents (tmpdir, 0700) == 0);
cmdline = g_strdup_printf ("%s view --muhome=%s %s%cbar%ccur%cmail4",
MU_PROGRAM,
tmpdir,
@ -422,7 +422,7 @@ test_mu_view_01 (void)
output = NULL;
g_assert (g_spawn_command_line_sync (cmdline, &output, NULL, NULL, NULL));
g_assert_cmpstr (output, !=, NULL);
/*
* note: there are two possibilities here; older versions of
* GMime will produce:
@ -445,7 +445,7 @@ test_mu_view_01 (void)
*/
len = strlen(output);
/* g_print ("\n[%s] (%d)\n", output, len); */
g_assert (len == 370 || len == 358 || len == 350 || len == 349);
g_assert (len > 349);
g_free (output);
g_free (cmdline);
@ -481,7 +481,7 @@ test_mu_view_multi (void)
len = strlen(output);
/* g_print ("\n[%s](%u)\n", output, len); */
g_assert_cmpuint (len,==,162);
g_assert_cmpuint (len,>,150);
g_free (output);
g_free (cmdline);
@ -517,7 +517,7 @@ test_mu_view_multi_separate (void)
len = strlen(output);
/* g_print ("\n[%s](%u)\n", output, len); */
g_assert_cmpuint (len,==,164);
g_assert_cmpuint (len,>,150);
g_free (output);
g_free (cmdline);
@ -604,6 +604,8 @@ main (int argc, char *argv[])
{
int rv;
g_test_init (&argc, &argv, NULL);
setenv ("LC_ALL", "en_US.utf8", 1);
g_test_add_func ("/mu-cmd/test-mu-index", test_mu_index);
g_test_add_func ("/mu-cmd/test-mu-find-01", test_mu_find_01);