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 | |||
@@ -18,6 +18,10 @@ | |||
18 | m4_version_prereq([2.52g]) | 18 | m4_version_prereq([2.52g]) |
19 | 19 | ||
20 | m4_define([AT_SKIP_TEST],[exit 77]) | 20 | m4_define([AT_SKIP_TEST],[exit 77]) |
21 | dnl AT_SORT_PREREQ - Skip test if sort utility outputs unwanted data on stderr | ||
22 | m4_define([AT_SORT_PREREQ],[ | ||
23 | test -z "`sort < /dev/null 2>&1`" || AT_SKIP_TEST | ||
24 | ]) | ||
21 | 25 | ||
22 | AT_INIT | 26 | AT_INIT |
23 | AT_TESTED([wydawca]) | 27 | AT_TESTED([wydawca]) |
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 | |||
@@ -21,9 +21,6 @@ AT_DATA([template], | |||
21 | wydawca: [[DEBUG]] @WD_SRC@/ok -> @WD_DST@ | 21 | wydawca: [[DEBUG]] @WD_SRC@/ok -> @WD_DST@ |
22 | wydawca: [[DEBUG]] @WD_SRC@/fail -> @WD_DST@ | 22 | wydawca: [[DEBUG]] @WD_SRC@/fail -> @WD_DST@ |
23 | wydawca: [[DEBUG]] @WD_SRC@/test -> @WD_DST@ | 23 | wydawca: [[DEBUG]] @WD_SRC@/test -> @WD_DST@ |
24 | wydawca: [[DEBUG]] found file file: distributive, stem: file | ||
25 | wydawca: [[DEBUG]] found file file.directive.asc: signed upload directive, stem: file | ||
26 | wydawca: [[DEBUG]] found file file.sig: detached signature, stem: file | ||
27 | wydawca: [[DEBUG]] processing spool test (@WD_DST@) | 24 | wydawca: [[DEBUG]] processing spool test (@WD_DST@) |
28 | wydawca: [[DEBUG]] FILE file, DIST=file, SIG=file.sig, DIRECTIVE=file.directive.asc | 25 | wydawca: [[DEBUG]] FILE file, DIST=file, SIG=file.sig, DIRECTIVE=file.directive.asc |
29 | wydawca: [[NOTICE]] Good signature from Wydawca (Testsuite) <bug-wydawca@gnu.org.ua> | 26 | wydawca: [[NOTICE]] Good signature from Wydawca (Testsuite) <bug-wydawca@gnu.org.ua> |
@@ -51,17 +48,23 @@ wydawca: [[INFO]] check failures: 0 | |||
51 | wydawca: [[NOTICE]] AT_PACKAGE_TARNAME (AT_PACKAGE_NAME AT_PACKAGE_VERSION) finished | 48 | wydawca: [[NOTICE]] AT_PACKAGE_TARNAME (AT_PACKAGE_NAME AT_PACKAGE_VERSION) finished |
52 | ]) | 49 | ]) |
53 | 50 | ||
54 | AT_CHECK([ | 51 | AT_CHECK([AT_SORT_PREREQ |
55 | wydawca_init_testdirs | 52 | wydawca_init_testdirs |
56 | wydawca_config wydawca.rc | 53 | wydawca_config wydawca.rc |
57 | wydawca_upload test file | 54 | wydawca_upload test file |
58 | 55 | ||
59 | wydawca_expandmeta template experr | 56 | wydawca_expandmeta template experr |
60 | 57 | set -e | |
61 | wydawca --no-preproc --dry-run -c wydawca.rc | 58 | wydawca --no-preproc --dry-run -c wydawca.rc 2>err |
59 | set +e | ||
60 | grep "found file" err | sort | ||
61 | grep -v "found file" err >&2 | ||
62 | ], | 62 | ], |
63 | [0], | 63 | [0], |
64 | [], | 64 | [wydawca: [[DEBUG]] found file file.directive.asc: signed upload directive, stem: file |
65 | wydawca: [[DEBUG]] found file file.sig: detached signature, stem: file | ||
66 | wydawca: [[DEBUG]] found file file: distributive, stem: file | ||
67 | ], | ||
65 | [experr]) | 68 | [experr]) |
66 | 69 | ||
67 | wydawca_clean_testdirs | 70 | wydawca_clean_testdirs |