tests: fix spurious failure of txinfo21.test on FreeBSD
authorStefano Lattarini <stefano.lattarini@gmail.com>
Sat, 7 May 2011 12:34:39 +0000 (14:34 +0200)
committerStefano Lattarini <stefano.lattarini@gmail.com>
Sat, 7 May 2011 12:59:43 +0000 (14:59 +0200)
* tests/txinfo21.test: Use the `is_newest' subroutine instead of
the `ls -t' hack to to determine whether a file has been updated.
This is required because at least FreeBSD `ls' do not sort files
with the same timestamp in alphabetical order when using the `-t'
option.

ChangeLog
tests/txinfo21.test

index 62c5493..b9c71f3 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2011-05-07  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       tests: fix spurious failure of txinfo21.test on FreeBSD
+       * tests/txinfo21.test: Use the `is_newest' subroutine instead of
+       the `ls -t' hack to to determine whether a file has been updated.
+       This is required because at least FreeBSD `ls' do not sort files
+       with the same timestamp in alphabetical order when using the `-t'
+       option.
+
 2011-05-04  Stefano Lattarini  <stefano.lattarini@gmail.com>
 
        tests defs: allow requirements for compilers (mostly dummy)
index 4bbce4a..5644c0b 100755 (executable)
@@ -95,11 +95,11 @@ test -d sub/main2.html
 test -d rec/main3.html
 
 # Rebuilding main.html should cause its timestamp to be updated.
-test `ls -1td main.texi main.html | sed 1q` = main.html
+is_newest main.html main.texi
 $sleep
 touch main.texi
 $MAKE html
-test `ls -1td main.texi main.html | sed 1q` = main.html
+is_newest main.html main.texi
 
 $MAKE clean
 test ! -d main.html