for code in FILE_NOT_EMAIL READ_ONLY_DATABASE UPGRADE_REQUIRED PATH_ERROR; do
test_expect_code 1 "EXIT_FAILURE when add_message returns $code" \
- "gdb --batch-silent --return-child-result \
+ "${TEST_GDB} --batch-silent --return-child-result \
-ex 'set args insert < $gen_msg_filename' \
-x index-file-$code.gdb notmuch"
test_expect_code 0 "success exit with --keep when add_message returns $code" \
- "gdb --batch-silent --return-child-result \
+ "${TEST_GDB} --batch-silent --return-child-result \
-ex 'set args insert --keep < $gen_msg_filename' \
-x index-file-$code.gdb notmuch"
done
for code in OUT_OF_MEMORY XAPIAN_EXCEPTION ; do
test_expect_code 75 "EX_TEMPFAIL when add_message returns $code" \
- "gdb --batch-silent --return-child-result \
+ "${TEST_GDB} --batch-silent --return-child-result \
-ex 'set args insert < $gen_msg_filename' \
-x index-file-$code.gdb notmuch"
test_expect_code 0 "success exit with --keep when add_message returns $code" \
- "gdb --batch-silent --return-child-result \
+ "${TEST_GDB} --batch-silent --return-child-result \
-ex 'set args insert --keep < $gen_msg_filename' \
-x index-file-$code.gdb notmuch"
done