-#!/bin/bash
+#!/usr/bin/env bash
test_description="threading when messages received out of order"
. ./test-lib.sh
test_expect_equal "$output" "Added 1 new message to the database."
test_begin_subtest "Searching returns the message"
-output=$($NOTMUCH search foo | notmuch_search_sanitize)
+output=$(notmuch search foo | notmuch_search_sanitize)
test_expect_equal "$output" "thread:XXX 2000-01-01 [1/1] Notmuch Test Suite; brokenthreadtest (inbox unread)"
test_begin_subtest "Adding second child message"
test_expect_equal "$output" "Added 1 new message to the database."
test_begin_subtest "Searching returns both messages in one thread"
-output=$($NOTMUCH search foo | notmuch_search_sanitize)
+output=$(notmuch search foo | notmuch_search_sanitize)
test_expect_equal "$output" "thread:XXX 2000-01-01 [2/2] Notmuch Test Suite; brokenthreadtest (inbox unread)"
test_begin_subtest "Adding parent message"
test_expect_equal "$output" "Added 1 new message to the database."
test_begin_subtest "Searching returns all three messages in one thread"
-output=$($NOTMUCH search foo | notmuch_search_sanitize)
+output=$(notmuch search foo | notmuch_search_sanitize)
test_expect_equal "$output" "thread:XXX 2000-01-01 [3/3] Notmuch Test Suite; brokenthreadtest (inbox unread)"
test_done