X-Git-Url: https://git.cworth.org/git?a=blobdiff_plain;f=test%2FT610-message-property.sh;h=4ec854748532d105cd5e1a71256536b066b89cf3;hb=2d036dbc3b6e48b12ab3e8aa0cbe713d2ef96854;hp=53a0be3bdf3c3cb170ad59fe9c8fc6b9dffa780e;hpb=e88297c072e6bfbeaedc1287ec695ca37537255e;p=notmuch diff --git a/test/T610-message-property.sh b/test/T610-message-property.sh index 53a0be3b..4ec85474 100755 --- a/test/T610-message-property.sh +++ b/test/T610-message-property.sh @@ -6,10 +6,6 @@ test_description="message property API" add_email_corpus cat < c_head -#include -#include -#include -#include #include void print_properties (notmuch_message_t *message, const char *prefix, notmuch_bool_t exact) { @@ -65,7 +61,7 @@ cat c_head - c_tail <<'EOF' | test_C ${MAIL_DIR} EXPECT0(notmuch_message_get_property (message, "testkey2", &val)); printf("testkey2 = %s\n", val); - /* remove non-existant value for key */ + /* remove non-existent value for key */ EXPECT0(notmuch_message_remove_property (message, "testkey2", "this value has spaces and = sign")); EXPECT0(notmuch_message_get_property (message, "testkey2", &val)); printf("testkey2 = %s\n", val); @@ -186,6 +182,18 @@ EXPECT0(notmuch_message_add_property (message, "testkey3", "testvalue3")); EXPECT0(notmuch_message_add_property (message, "testkey3", "alice3")); print_properties (message, "testkey", FALSE); EOF +# expected: 4 values for testkey1, 3 values for testkey3 +# they are not guaranteed to be sorted, so sort them, leaving the first +# line '== stdout ==' and the end ('== stderr ==' and whatever error +# may have been printed) alone +mv OUTPUT unsorted_OUTPUT +awk ' NR == 1 { print; next } \ + NR < 6 { print | "sort"; next } \ + NR == 6 { close("sort") } \ + NR < 9 { print | "sort"; next } \ + NR == 9 { close("sort") } \ + { print }' unsorted_OUTPUT > OUTPUT +rm unsorted_OUTPUT cat <<'EOF' >EXPECTED == stdout == alice