>$TMP3
@@ -28,4 +28,4 @@
# Check. The order of the terms in the database may differ.
sort $TMP2 >$TMP4
sort $TMP3 >$TMP5
-cmp -s $TMP4 $TMP5
+diff -u $TMP4 $TMP5
diff -Nru html-xml-utils-7.6/tests/index9.sh html-xml-utils-7.7/tests/index9.sh
--- html-xml-utils-7.6/tests/index9.sh 1970-01-01 00:00:00.000000000 +0000
+++ html-xml-utils-7.7/tests/index9.sh 2018-02-23 14:29:48.000000000 +0000
@@ -0,0 +1,41 @@
+:
+trap 'rm $TMP1 $TMP2 $TMP3' 0
+TMP1=`mktemp /tmp/tmp.XXXXXXXXXX` || exit 1
+TMP2=`mktemp /tmp/tmp.XXXXXXXXXX` || exit 1
+TMP3=`mktemp /tmp/tmp.XXXXXXXXXX` || exit 1
+
+cat >$TMP1 <<-EOF
+ Document title
+ 0-term
+
Heading 0
+ Heading 1
+ A-term
+
Heading 2
+ <M-term>
+
Heading 3
+ Z-term
+
Index
+
+ Remove this.
+
+EOF
+
+# The echo adds a newline at the end of the file
+#
+(./hxnum $TMP1 | LC_ALL=C ./hxindex -t -N; echo) >$TMP2
+
+cat >$TMP3 <Document title0-term
+
1. Heading 0
Heading 1
A-term
+
1.1. Heading 2
<M-term>
+
1.1.1. Heading 3
Z-term
+
2. Index
+