diff options
author | Sergey Poznyakoff <gray@gnu.org.ua> | 2012-10-10 19:16:16 +0300 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org.ua> | 2012-10-10 19:22:57 +0300 |
commit | 800e9a67d5d2ced20192f3191b72c12707a30cd4 (patch) | |
tree | 8ded26adf647ba8e467b87110070b977500c6ca2 /tests/filemap.at | |
parent | aa129be43d57fac4842f0340168404a21b3927e6 (diff) | |
download | eclat-800e9a67d5d2ced20192f3191b72c12707a30cd4.tar.gz eclat-800e9a67d5d2ced20192f3191b72c12707a30cd4.tar.bz2 |
Improve map support.
* doc/eclat.conf.5: Document the null map.
* lib/nullmap.c: New file.
* lib/Makefile.am: Add new files.
* lib/gdbmmap.c (gdbm_map_open): Fix gdbm_open arguments.
Report a detailed error description if it fails.
* lib/libeclat.h (eclat_map_drv_null): New extern.
* src/eclat.c (main): Register the null map.
* tests/.gitignore: Update.
* tests/Makefile.am: Add new files.
* tests/filemap.at: New file.
* tests/gdbmload.c: New file.
* tests/gdbmmap.at: New file.
* tests/nullmap.at: New file.
* tests/atlocal.in (GDBMLOAD): New variable.
* tests/testsuite.at: Include new files.
Diffstat (limited to 'tests/filemap.at')
-rw-r--r-- | tests/filemap.at | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/tests/filemap.at b/tests/filemap.at new file mode 100644 index 0000000..b84da7c --- /dev/null +++ b/tests/filemap.at @@ -0,0 +1,38 @@ +# This file is part of Eclat -*- Autotest -*- +# Copyright (C) 2012 Sergey Poznyakoff +# +# Eclat 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. +# +# Eclat 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 Eclat. If not, see <http://www.gnu.org/licenses/>. + +AT_SETUP([file]) +AT_KEYWORDS([map filemap]) + +AT_DATA([test.conf], +[map file { + type file; + file "instances.txt"; +} +]) + +AT_DATA([instances.txt], +[web:i-feed1234 +dbserver:i-12345678 +dbserv:i-deadbeef +]) + +AT_CHECK([eclat --config-file test.conf --test-map file dbserv], +[0], +[i-deadbeef +]) + +AT_CLEANUP |