diff options
author | Sergey Poznyakoff <gray@gnu.org.ua> | 2012-05-27 19:10:36 +0300 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org.ua> | 2012-05-27 19:10:36 +0300 |
commit | 9ba482929aff9a95afd29ad14328dc0cd58d78c4 (patch) | |
tree | c402609770f680b4b16ae879a63b87fbc686ba6c /tests | |
parent | 83d7377354504cf3d92a5bdf9cade07554c6b66e (diff) | |
download | wydawca-9ba482929aff9a95afd29ad14328dc0cd58d78c4.tar.gz wydawca-9ba482929aff9a95afd29ad14328dc0cd58d78c4.tar.bz2 |
Bugfix in testsuite.
* tests/testsuite.at (AT_SORT_PREREQ): New macro.
* tests/upload-dry.at: Avoid dependency on the sort order.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/testsuite.at | 4 | ||||
-rw-r--r-- | tests/upload-dry.at | 17 |
2 files changed, 14 insertions, 7 deletions
diff --git a/tests/testsuite.at b/tests/testsuite.at index 3821985..d0195e3 100644 --- a/tests/testsuite.at +++ b/tests/testsuite.at @@ -19,4 +19,8 @@ m4_version_prereq([2.52g]) m4_define([AT_SKIP_TEST],[exit 77]) +dnl AT_SORT_PREREQ - Skip test if sort utility outputs unwanted data on stderr +m4_define([AT_SORT_PREREQ],[ +test -z "`sort < /dev/null 2>&1`" || AT_SKIP_TEST +]) AT_INIT diff --git a/tests/upload-dry.at b/tests/upload-dry.at index 2116af2..e2e4063 100644 --- a/tests/upload-dry.at +++ b/tests/upload-dry.at @@ -22,7 +22,4 @@ wydawca: [[DEBUG]] @WD_SRC@/ok -> @WD_DST@ wydawca: [[DEBUG]] @WD_SRC@/fail -> @WD_DST@ wydawca: [[DEBUG]] @WD_SRC@/test -> @WD_DST@ -wydawca: [[DEBUG]] found file file: distributive, stem: file -wydawca: [[DEBUG]] found file file.directive.asc: signed upload directive, stem: file -wydawca: [[DEBUG]] found file file.sig: detached signature, stem: file wydawca: [[DEBUG]] processing spool test (@WD_DST@) wydawca: [[DEBUG]] FILE file, DIST=file, SIG=file.sig, DIRECTIVE=file.directive.asc @@ -52,5 +49,5 @@ wydawca: [[NOTICE]] AT_PACKAGE_TARNAME (AT_PACKAGE_NAME AT_PACKAGE_VERSION) fini ]) -AT_CHECK([ +AT_CHECK([AT_SORT_PREREQ wydawca_init_testdirs wydawca_config wydawca.rc @@ -58,9 +55,15 @@ wydawca_upload test file wydawca_expandmeta template experr - -wydawca --no-preproc --dry-run -c wydawca.rc +set -e +wydawca --no-preproc --dry-run -c wydawca.rc 2>err +set +e +grep "found file" err | sort +grep -v "found file" err >&2 ], [0], -[], +[wydawca: [[DEBUG]] found file file.directive.asc: signed upload directive, stem: file +wydawca: [[DEBUG]] found file file.sig: detached signature, stem: file +wydawca: [[DEBUG]] found file file: distributive, stem: file +], [experr]) |