]> git.notmuchmail.org Git - notmuch/blobdiff - test/T640-database-modified.sh
lib: replace deprecated n_q_search_messages with status returning version
[notmuch] / test / T640-database-modified.sh
index 516836b0c91e192c2b6c8cb1c9f30b7a6bb95697..e35e35f64289d5b84c11b5c0d244e7d3f6e09728 100755 (executable)
@@ -25,6 +25,7 @@ main (int argc, char **argv)
     notmuch_message_t *message, *ro_message;
     notmuch_query_t *query;
     notmuch_tags_t *tags;
+    int i;
 
     EXPECT0 (notmuch_database_open (path, NOTMUCH_DATABASE_MODE_READ_ONLY, &ro_db));
     assert(ro_db);
@@ -34,13 +35,13 @@ main (int argc, char **argv)
 
     EXPECT0 (notmuch_database_open (path, NOTMUCH_DATABASE_MODE_READ_WRITE, &rw_db));
     query = notmuch_query_create(rw_db, "");
-    EXPECT0 (notmuch_query_search_messages_st (query, &messages));
+    EXPECT0 (notmuch_query_search_messages (query, &messages));
 
-    for (int count=0;
+    for (;
         notmuch_messages_valid (messages);
-        notmuch_messages_move_to_next (messages), count++) {
+        notmuch_messages_move_to_next (messages)) {
        message = notmuch_messages_get (messages);
-       for (int i=0; i<200; i++) {
+       for (i=0; i<200; i++) {
            char *tag_str = talloc_asprintf(rw_db, "%d", i);
            EXPECT0 (notmuch_message_add_tag (message, tag_str));
            talloc_free (tag_str);