test: remove unnecessary sorting

The other tests rely on a stable output.
This commit is contained in:
Kevin Boulain 2023-03-29 18:13:30 +02:00 committed by David Bremner
parent ce59df5296
commit 552d9ec9f7

View file

@ -186,18 +186,6 @@ EXPECT0(notmuch_message_add_property (message, "testkey3", "testvalue3"));
EXPECT0(notmuch_message_add_property (message, "testkey3", "alice3")); EXPECT0(notmuch_message_add_property (message, "testkey3", "alice3"));
print_properties (message, "testkey", FALSE); print_properties (message, "testkey", FALSE);
EOF EOF
# expected: 4 values for testkey1, 3 values for testkey3
# they are not guaranteed to be sorted, so sort them, leaving the first
# line '== stdout ==' and the end ('== stderr ==' and whatever error
# may have been printed) alone
mv OUTPUT unsorted_OUTPUT
awk ' NR == 1 { print; next } \
NR < 6 { print | "sort"; next } \
NR == 6 { close("sort") } \
NR < 9 { print | "sort"; next } \
NR == 9 { close("sort") } \
{ print }' unsorted_OUTPUT > OUTPUT
rm unsorted_OUTPUT
cat <<'EOF' >EXPECTED cat <<'EOF' >EXPECTED
== stdout == == stdout ==
testkey1 = alice testkey1 = alice