aboutsummaryrefslogtreecommitdiff
path: root/test/T190-multipart.sh
diff options
context:
space:
mode:
authorJani Nikula <jani@nikula.org>2017-02-26 15:43:00 +0200
committerDavid Bremner <david@tethera.net>2017-03-09 09:01:21 -0400
commitd0cd253b37646d9364d046e1d3edb022a58c105a (patch)
treeff9af83a8bd1e3380e81c3e3d73389fc98d190a7 /test/T190-multipart.sh
parentb8f12bd3717aa446ef04197734af7a055e6909fe (diff)
test: require test_begin_subtest before test_expect_success
Unify the subtests by requiring test_begin_subtest before test_expect_success. (Similar change for test_expect_code will follow.) This increases clarity in the test scripts by having a separate line for the start of the subtest with the heading, and makes it possible to simplify the test infrastructure by making all subtests similar.
Diffstat (limited to 'test/T190-multipart.sh')
-rwxr-xr-xtest/T190-multipart.sh20
1 files changed, 8 insertions, 12 deletions
diff --git a/test/T190-multipart.sh b/test/T190-multipart.sh
index a31d61e2..a6b155e9 100755
--- a/test/T190-multipart.sh
+++ b/test/T190-multipart.sh
@@ -338,9 +338,8 @@ Non-text part: application/pgp-signature
EOF
test_expect_equal_file OUTPUT EXPECTED
-test_expect_success \
- "--format=text --part=8, no part, expect error" \
- "notmuch show --format=text --part=8 'id:87liy5ap00.fsf@yoom.home.cworth.org'"
+test_begin_subtest "--format=text --part=8, no part, expect error"
+test_expect_success "notmuch show --format=text --part=8 'id:87liy5ap00.fsf@yoom.home.cworth.org'"
test_begin_subtest "--format=json --part=0, full message"
notmuch show --format=json --part=0 'id:87liy5ap00.fsf@yoom.home.cworth.org' >OUTPUT
@@ -444,9 +443,8 @@ cat <<EOF >EXPECTED
EOF
test_expect_equal_json "$(cat OUTPUT)" "$(cat EXPECTED)"
-test_expect_success \
- "--format=json --part=10, no part, expect error" \
- "notmuch show --format=json --part=10 'id:87liy5ap00.fsf@yoom.home.cworth.org'"
+test_begin_subtest "--format=json --part=10, no part, expect error"
+test_expect_success "notmuch show --format=json --part=10 'id:87liy5ap00.fsf@yoom.home.cworth.org'"
test_begin_subtest "--format=raw"
notmuch show --format=raw 'id:87liy5ap00.fsf@yoom.home.cworth.org' >OUTPUT
@@ -580,9 +578,8 @@ W6cAmQE4dcYrx/LPLtYLZm1jsGauE5hE
EOF
test_expect_equal_file OUTPUT EXPECTED
-test_expect_success \
- "--format=raw --part=10, no part, expect error" \
- "notmuch show --format=raw --part=8 'id:87liy5ap00.fsf@yoom.home.cworth.org'"
+test_begin_subtest "--format=raw --part=10, no part, expect error"
+test_expect_success "notmuch show --format=raw --part=8 'id:87liy5ap00.fsf@yoom.home.cworth.org'"
test_begin_subtest "--format=mbox"
notmuch show --format=mbox 'id:87liy5ap00.fsf@yoom.home.cworth.org' >OUTPUT
@@ -592,9 +589,8 @@ cat "${MAIL_DIR}"/multipart >>EXPECTED
echo >>EXPECTED
test_expect_equal_file OUTPUT EXPECTED
-test_expect_success \
- "--format=mbox --part=1, incompatible, expect error" \
- "! notmuch show --format=mbox --part=1 'id:87liy5ap00.fsf@yoom.home.cworth.org'"
+test_begin_subtest "--format=mbox --part=1, incompatible, expect error"
+test_expect_success "! notmuch show --format=mbox --part=1 'id:87liy5ap00.fsf@yoom.home.cworth.org'"
test_begin_subtest "'notmuch reply' to a multipart message"
notmuch reply 'id:87liy5ap00.fsf@yoom.home.cworth.org' >OUTPUT