Related to automake bug#8508.
* tests/self-check-cleanup.test: Be laxer when grepping output
from `ls -l', to account for ACLs and SELinux-only files.
* tests/self-check-dir.test: Source `defs-static' to read in the
correct definition for $SHELL.
* tests/self-check-me.test: Likewise, and extend a bit.
Report from Jim Meyering.
+2011-04-16 Stefano Lattarini <stefano.lattarini@gmail.com>
+
+ tests: fix few bugs in self checks
+ Related to automake bug#8508.
+ * tests/self-check-cleanup.test: Be laxer when grepping output
+ from `ls -l', to account for ACLs and SELinux-only files.
+ * tests/self-check-dir.test: Source `defs-static' to read in the
+ correct definition for $SHELL.
+ * tests/self-check-me.test: Likewise, and extend a bit.
+ Report from Jim Meyering.
+
2011-02-25 Stefano Lattarini <stefano.lattarini@gmail.com>
tests: add testcases sanity-checking the testsuite
cd ..
$SHELL -c '. ./defs' dummy.test
ls -l # For debugging.
- ls -l file | grep "^---------- .*file"
- ls -ld dir | grep "^d--------- .*dir"
+ ls -l file | grep "^----------.*file"
+ ls -ld dir | grep "^d---------.*dir"
$SHELL -c '
ocwd=`pwd` || exit 1
ln -s "$ocwd/dir" "$ocwd/file" .
' dummy.test
ls -l # For debugging.
- ls -l file | grep "^---------- .*file"
- ls -ld dir | grep "^d--------- .*dir"
+ ls -l file | grep "^----------.*file"
+ ls -ld dir | grep "^d---------.*dir"
rmdir dir
rm -f file
# Check that tests using `./defs' create a proper temporary directory,
# and run in it.
+. ./defs-static || exit 1
+
set -ex
this=S_dir
# Sanity check for the automake testsuite.
# Make sure that $me gets automatically defined by `./defs'.
-set -ex
+. ./defs-static || exit 1
-: ${SHELL=/bin/sh}
+set -ex
$SHELL -c '. ./defs && echo me=$me' foo-bar-.test | grep '^me=foo-bar-$'
$SHELL -c '. ./defs && echo me=$me' _foo__bar.test | grep '^me=_foo__bar$'
$SHELL -c '. ./defs && echo me=$me' 012.test | grep '^me=012$'
$SHELL -c '. ./defs && echo me=$me' foo.bar | grep '^me=foo\.bar$'
+$SHELL -c '. ./defs && echo me=$me' a.b.c.test | grep '^me=a\.b\.c$'
: