aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorDavid Bremner <david@tethera.net>2020-07-04 09:29:41 -0300
committerDavid Bremner <david@tethera.net>2020-07-13 07:19:22 -0300
commitcca551a7366bfe29e5c97cea53c2d50fbffc27dd (patch)
tree76aa7fb28a9e1fef9fe6f8b1cd894b8a5cad45cf /test
parenta280d2a1a18183c870f6332da751b2c566cbef16 (diff)
test: drop use of assert in closed db tests
Instead of printing the same static string for each test, can replace the assert with something simpler (or at least easier to integrate into the test suite).
Diffstat (limited to 'test')
-rwxr-xr-xtest/T560-lib-error.sh10
1 files changed, 4 insertions, 6 deletions
diff --git a/test/T560-lib-error.sh b/test/T560-lib-error.sh
index 5af3eab2..6432faaa 100755
--- a/test/T560-lib-error.sh
+++ b/test/T560-lib-error.sh
@@ -322,7 +322,6 @@ cat <<EOF > c_head2
#include <stdio.h>
#include <notmuch.h>
#include <notmuch-test.h>
-#include <assert.h>
int main (int argc, char** argv)
{
notmuch_database_t *db;
@@ -337,7 +336,6 @@ int main (int argc, char** argv)
exit (1);
}
EXPECT0(notmuch_database_find_message (db, id, &message));
- assert(message != NULL);
EXPECT0(notmuch_database_close (db));
EOF
@@ -346,12 +344,12 @@ cat c_head2 - c_tail <<'EOF' | test_C ${MAIL_DIR}
{
const char *id2;
id2=notmuch_message_get_message_id (message);
- printf("%s\n%d\n", id, id2==NULL);
+ printf("%d\n%d\n", message != NULL, id2==NULL);
}
EOF
cat <<EOF > EXPECTED
== stdout ==
-1258471718-6781-1-git-send-email-dottedmag@dottedmag.net
+1
1
== stderr ==
EOF
@@ -362,12 +360,12 @@ cat c_head2 - c_tail <<'EOF' | test_C ${MAIL_DIR}
{
const char *id2;
id2=notmuch_message_get_thread_id (message);
- printf("%s\n%d\n", id, id2==NULL);
+ printf("%d\n%d\n", message != NULL, id2==NULL);
}
EOF
cat <<EOF > EXPECTED
== stdout ==
-1258471718-6781-1-git-send-email-dottedmag@dottedmag.net
+1
1
== stderr ==
EOF