. ./test-lib.sh
test_begin_subtest "Use References when In-Reply-To is broken"
-test_subtest_known_broken
add_message '[id]="foo@one.com"' \
'[subject]=one'
add_message '[in-reply-to]="mumble"' \
test_expect_equal_json "$output" "$expected"
test_begin_subtest "Prefer References to In-Reply-To"
-test_subtest_known_broken
add_message '[id]="foo@two.com"' \
'[subject]=two'
add_message '[in-reply-to]="<bar@baz.com>"' \
test_expect_equal_json "$output" "$expected"
test_begin_subtest "Use last Reference"
-test_subtest_known_broken
add_message '[id]="foo@four.com"' \
'[subject]="four"'
add_message '[id]="bar@four.com"' \