Writing Tests
-------------
-The test script is written as a shell script. It should start
-with the standard "#!/bin/bash" with copyright notices, and an
+The test script is written as a shell script. It should start with
+the standard "#!/usr/bin/env bash" with copyright notices, and an
assignment to variable 'test_description', like this:
- #!/bin/bash
+ #!/usr/bin/env bash
#
# Copyright (c) 2005 Junio C Hamano
#
-#!/bin/sh
+#!/usr/bin/env bash
fixed=0
success=0
-#!/bin/bash
+#!/usr/bin/env bash
test_description="author reordering;"
. ./test-lib.sh
-#!/bin/bash
+#!/usr/bin/env bash
#
# Copyright (c) 2005 Junio C Hamano
#
-#!/bin/bash
+#!/usr/bin/env bash
test_description="\"notmuch dump\" and \"notmuch restore\""
. ./test-lib.sh
-#!/bin/bash
+#!/usr/bin/env bash
test_description="emacs interface"
. test-lib.sh
-#!/bin/bash
+#!/usr/bin/env bash
test_description="encoding issues"
. ./test-lib.sh
-#!/bin/bash
+#!/usr/bin/env bash
test_description="From line heuristics (with multiple configured addresses)"
. ./test-lib.sh
-#!/bin/bash
+#!/usr/bin/env bash
test_description="--format=json output"
. ./test-lib.sh
-#!/bin/bash
+#!/usr/bin/env bash
test_description="messages with ridiculously-long message IDs"
. ./test-lib.sh
-#!/bin/bash
+#!/usr/bin/env bash
test_description="maildir synchronization"
-#!/bin/bash
+#!/usr/bin/env bash
test_description='"notmuch new" in several variations'
. ./test-lib.sh
-#!/bin/bash
+#!/usr/bin/env bash
# Run tests
#
-#!/bin/bash
+#!/usr//bin/env bash
test_description='notmuch show --format=raw'
. ./test-lib.sh
-#!/bin/bash
+#!/usr/bin/env bash
test_description="\"notmuch reply\" in several variations"
. ./test-lib.sh
-#!/bin/bash
+#!/usr/bin/env bash
test_description='"notmuch search" in several variations'
. ./test-lib.sh
-#!/bin/bash
+#!/usr/bin/env bash
test_description='various settings for "notmuch search --output="'
. ./test-lib.sh
-#!/bin/bash
+#!/usr/bin/env bash
#
# Copyright (c) 2005 Junio C Hamano
#
-#!/bin/bash
+#!/usr/bin/env bash
test_description='the verbosity options of the test framework itself.'
-#!/bin/bash
+#!/usr/bin/env bash
test_description="naming of threads with changing subject"
. ./test-lib.sh
-#!/bin/bash
+#!/usr/bin/env bash
test_description="threading when messages received out of order"
. ./test-lib.sh
-#!/bin/bash
+#!/usr/bin/env bash
test_description="handling of uuencoded data"
. ./test-lib.sh
-#!/bin/sh
+#!/usr/bin/env bash
base=$(basename "$0")