]> git.notmuchmail.org Git - notmuch/blobdiff - test/T610-message-property.sh
Fix typos
[notmuch] / test / T610-message-property.sh
index 04f0c9be967af5e2e07e2ad89415b1584158d15e..d0e52f4ac46cbb481b76197682f43ecb3adce728 100755 (executable)
@@ -65,7 +65,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);
@@ -101,7 +101,6 @@ EOF
 test_expect_equal_file EXPECTED OUTPUT
 
 test_begin_subtest "testing string map binary search (via message properties)"
-test_subtest_known_broken
 cat c_head - c_tail <<'EOF' | test_C ${MAIL_DIR}
 {
    char *keys[] = {"a", "b", "c", "d", "e", NULL};
@@ -187,6 +186,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