X-Git-Url: https://git.notmuchmail.org/git?a=blobdiff_plain;f=test%2FT260-thread-order.sh;h=f720c99817a1561ef8df2c1300644d8a2ee600db;hb=1e96445cb5dc333e22b9ce01245902ba23fdb437;hp=99f58336f2253a8906d03cbb61028d1c954b49fb;hpb=ee476f1e7616fa53c492b8077b55af35662eec82;p=notmuch diff --git a/test/T260-thread-order.sh b/test/T260-thread-order.sh index 99f58336..f720c998 100755 --- a/test/T260-thread-order.sh +++ b/test/T260-thread-order.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash test_description="threading when messages received out of order" -. ./test-lib.sh +. ./test-lib.sh || exit 1 # Generate all single-root four message thread structures. We'll use # this for multiple tests below. @@ -45,9 +45,12 @@ for ((n = 0; n < 4; n++)); do while read -a parents; do references="" parent=${parents[$n]} - while [[ $parent != None ]]; do + while [[ ${parent:-None} != None ]]; do references=" $references" + pp=$parent parent=${parents[$parent]} + # Avoid looping over broken input (if ever) + parents[$pp]="None" done generate_message \