test_description='test of searching by thread-id'
-. ./test-lib.sh || exit 1
+. $(dirname "$0")/test-lib.sh || exit 1
add_email_corpus
success=0
for id in $(notmuch search --output=messages '*'); do
count=$((count +1))
- matches=$(notmuch search --output=threads "$id" | wc -l)
+ matches=$((`notmuch search --output=threads "$id" | wc -l`))
if [ "$matches" = 1 ]; then
success=$((success + 1))
fi