#!/bin/sh
######################################################
#
# Test that the -thread option works.
#
######################################################

. "$MH_TEST_COMMON"

# All messages should be go to stdout
anno -component 'Message-Id' -text '<testid>' 5 -nodate
anno -component 'Message-Id' -text '<testid2>' 6 -nodate

runandcheck 'pick -thread 5' <<!
5
!

anno -component 'References' -text '<testid>' 6 -nodate -append
runandcheck 'pick -thread 5' <<!
5
6
!
runandcheck 'pick -thread 6' <<!
5
6
!
anno -delete -component 'References'
anno -component 'References' -text '<testid>' 6 -nodate
runandcheck 'pick -thread 6' <<!
5
6
!
