From 31d568e0760bc155ec2fbef1486faeee08cb6e05 Mon Sep 17 00:00:00 2001 From: "Dirk-Jan C. Binnema" Date: Sun, 10 Jul 2011 14:07:35 +0300 Subject: [PATCH] * rename the --separate option into --terminate (mu view), update test cases --- src/mu-config.c | 2 +- src/tests/test-mu-cmd.c | 7 +++---- src/tests/testdir2/bar/cur/mail6 | 18 ++++++++++++++++++ 3 files changed, 22 insertions(+), 5 deletions(-) create mode 100644 src/tests/testdir2/bar/cur/mail6 diff --git a/src/mu-config.c b/src/mu-config.c index c3ebc5a3..01b8e2cf 100644 --- a/src/mu-config.c +++ b/src/mu-config.c @@ -245,7 +245,7 @@ config_options_group_view (MuConfig *opts) GOptionEntry entries[] = { {"summary", 0, 0, G_OPTION_ARG_NONE, &opts->summary, "only show a short summary of the message (false)", NULL}, - {"terminator", 0, 0, G_OPTION_ARG_NONE, &opts->terminator, + {"terminate", 0, 0, G_OPTION_ARG_NONE, &opts->terminator, "terminate messages with ascii-0x07 (\\f, form-feed)", NULL}, {NULL, 0, 0, 0, NULL, NULL, NULL} }; diff --git a/src/tests/test-mu-cmd.c b/src/tests/test-mu-cmd.c index 4e72def5..762609c1 100644 --- a/src/tests/test-mu-cmd.c +++ b/src/tests/test-mu-cmd.c @@ -115,7 +115,7 @@ test_mu_index (void) store = mu_store_new (xpath, NULL, NULL); g_assert (store); - g_assert_cmpuint (mu_store_count (store), ==, 8); + g_assert_cmpuint (mu_store_count (store), ==, 9); mu_store_destroy (store); g_free (muhome); @@ -498,7 +498,7 @@ test_mu_view_multi_separate (void) tmpdir = test_mu_common_get_random_tmpdir(); g_assert (g_mkdir_with_parents (tmpdir, 0700) == 0); - cmdline = g_strdup_printf ("%s view --separate --muhome=%s " + cmdline = g_strdup_printf ("%s view --terminate --muhome=%s " "%s%cbar%ccur%cmail5 " "%s%cbar%ccur%cmail5", MU_PROGRAM, @@ -517,8 +517,7 @@ test_mu_view_multi_separate (void) len = strlen(output); /* g_print ("\n[%s](%u)\n", output, len); */ - g_assert_cmpuint (len,==,165); - + g_assert_cmpuint (len,==,166); g_free (output); g_free (cmdline); diff --git a/src/tests/testdir2/bar/cur/mail6 b/src/tests/testdir2/bar/cur/mail6 new file mode 100644 index 00000000..1d5c1d74 --- /dev/null +++ b/src/tests/testdir2/bar/cur/mail6 @@ -0,0 +1,18 @@ +Date: Thu, 31 Jul 2008 14:57:25 -0400 +From: "Geoff Tate" +Subject: eyes of a stranger +To: "Enrico Fermi" +Message-id: <3BE9E6535E302944823E7A1A20D852173@msg.id> +MIME-version: 1.0 +X-label: @NextActions, operation:mindcrime, Queensrÿche +Content-type: text/plain; charset=us-ascii +Content-transfer-encoding: 7BIT +Precedence: high + +And I raise my head and stare +Into the eyes of a stranger +I've always known that the mirror never lies +People always turn away +From the eyes of a stranger +Afraid to know what +Lies behind the stare