aboutsummaryrefslogtreecommitdiff
path: root/tests/upl12f.at
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org.ua>2012-05-27 15:11:59 +0300
committerSergey Poznyakoff <gray@gnu.org.ua>2012-05-27 15:33:30 +0300
commit83d7377354504cf3d92a5bdf9cade07554c6b66e (patch)
tree01d602910d6314edbd5568600e7dfb5b1b215bfa /tests/upl12f.at
parent5fc301baf79e9cc19b1bc8e7a5940e060611e349 (diff)
downloadwydawca-83d7377354504cf3d92a5bdf9cade07554c6b66e.tar.gz
wydawca-83d7377354504cf3d92a5bdf9cade07554c6b66e.tar.bz2
Implement upload directives version 1.2
* NEWS: Update. * README: Update. * doc/wydawca.texi: Document changes. * src/cmdline.opt: Update copyright years. * src/config.c: Update for new grecs version. New keywords: min-version and max-version. * src/directive.c (directive_unpack_version): New function. (directive_version_in_range_p): Set trp->version and print it. (directive) <replace_dir>: New directive. (directive_table): New directive "replace". (verify_directive_format): Use globals min_directive_version and max_directive_version. (process_directives): Handle replace_dir * src/diskio.c (dir_move_file): Use the "replace" directive to act on existing files. * src/wydawca.c (min_directive_version) (max_directive_version): New globals. (main): Loosen gpgme requirement: version 1.1.0 is Ok. * src/wydawca.h (MAX_DIRECTIVE_VERSION): Set to 102 (file_triplet) <version>: New member. (min_directive_version) (max_directive_version): New globals. (directive_unpack_version): New proto. * tests/upl11.at: New file. * tests/upl12f.at: New file. * tests/upl12t.at: New file. * tests/Makefile.am (TESTSUITE_AT): Add new files. * tests/atlocal.in (wydawca_upload): Change invocation. All uses updated. (wydawca_cmparc): New function. * tests/check-fail.at: Update. * tests/check-notify.at: Update. * tests/check-ok.at: Update. * tests/dist/file12f.directive.asc: New file. * tests/dist/file12t.directive.asc: New file. * tests/etc/wydawca.rcin (test): Define "archive" clause. * tests/mailstats.at: Update. * tests/notify-upl.at: Update. * tests/testsuite.at: Include new files. * tests/upload-dry.at: Update. * tests/upload.at: Update.
Diffstat (limited to 'tests/upl12f.at')
-rw-r--r--tests/upl12f.at66
1 files changed, 66 insertions, 0 deletions
diff --git a/tests/upl12f.at b/tests/upl12f.at
new file mode 100644
index 0000000..f3d96e5
--- /dev/null
+++ b/tests/upl12f.at
@@ -0,0 +1,66 @@
+# Check working uploads -*- Autotest -*-
+# Copyright (C) 2009-2012 Sergey Poznyakoff
+#
+# Wydawca is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3, or (at your option)
+# any later version.
+#
+# Wydawca is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Wydawca. If not, see <http://www.gnu.org/licenses/>.
+
+AT_SETUP([Implicit archivation disabled (version 1.2)])
+AT_KEYWORDS([upl12f])
+
+AT_DATA([template],
+[wydawca: [[NOTICE]] AT_PACKAGE_TARNAME (AT_PACKAGE_NAME AT_PACKAGE_VERSION) started
+wydawca: [[NOTICE]] file.directive.asc: VERSION: 1.2
+wydawca: [[NOTICE]] file.directive.asc: COMMENT: Gnupload for Wydawca testsuite
+wydawca: [[ERR]] refusing to upload file because it already exists and replace is not allowed
+wydawca: [[NOTICE]] removing file
+wydawca: [[NOTICE]] removing file.sig
+wydawca: [[NOTICE]] removing file.directive.asc
+wydawca: [[INFO]] errors: 1
+wydawca: [[INFO]] warnings: 0
+wydawca: [[INFO]] bad signatures: 0
+wydawca: [[INFO]] access violation attempts: 0
+wydawca: [[INFO]] complete triplets: 1
+wydawca: [[INFO]] incomplete triplets: 0
+wydawca: [[INFO]] bad triplets: 0
+wydawca: [[INFO]] expired triplets: 0
+wydawca: [[INFO]] triplet successes: 0
+wydawca: [[INFO]] files uploaded: 0
+wydawca: [[INFO]] files archived: 0
+wydawca: [[INFO]] symlinks created: 0
+wydawca: [[INFO]] symlinks removed: 0
+wydawca: [[INFO]] check failures: 0
+wydawca: [[NOTICE]] AT_PACKAGE_TARNAME (AT_PACKAGE_NAME AT_PACKAGE_VERSION) finished
+])
+
+AT_CHECK([
+wydawca_init_testdirs
+wydawca_config wydawca.rc
+destdir=$WD_DST/proj
+test -d $destdir || $MKDIR_P $destdir
+cp "$WD_DISTDIR/file" "$destdir"
+cp "$WD_DISTDIR/file.sig" "$destdir"
+
+wydawca_upload test file file12f.directive.asc
+
+wydawca_expandmeta template experr
+
+wydawca --no-preproc -c wydawca.rc || exit $?
+wydawca_cmp proj file file.sig
+],
+[0],
+[],
+[experr])
+
+wydawca_clean_testdirs
+
+AT_CLEANUP

Return to:

Send suggestions and report system problems to the System administrator.