#!/usr/bin/env bash
test_description='"notmuch new" in several variations'
-. ./test-lib.sh || exit 1
+. $(dirname "$0")/test-lib.sh || exit 1
test_begin_subtest "No new messages"
output=$(NOTMUCH_NEW --debug)
output=$(NOTMUCH_NEW --debug 2>&1)
test_expect_equal "$output" "Error: tag '-foo' in new.tags: tag starting with '-' forbidden"
-test_expect_code 1 "Invalid tags set exit code" \
- "NOTMUCH_NEW --debug 2>&1"
+test_begin_subtest "Invalid tags set exit code"
+test_expect_code 1 "NOTMUCH_NEW --debug 2>&1"
notmuch config set new.tags $OLDCONFIG
set breakpoint pending on
set logging file notmuch-new-vanish-gdb.log
set logging on
-break add_file
+break notmuch_database_index_file
commands
shell rm -f ${MAIL_DIR}/vanish
continue
run
EOF
-gdb --batch-silent --return-child-result -x notmuch-new-vanish.gdb \
+${TEST_GDB} --batch-silent --return-child-result -x notmuch-new-vanish.gdb \
--args notmuch new 2>OUTPUT 1>/dev/null
echo "exit status: $?" >> OUTPUT