1# This file is part of Eclat -*- Autotest -*-
2# Copyright (C) 2012-2018 Sergey Poznyakoff
3#
4# Eclat is free software; you can redistribute it and/or modify
5# it under the terms of the GNU General Public License as published by
6# the Free Software Foundation; either version 3, or (at your option)
7# any later version.
8#
9# Eclat is distributed in the hope that it will be useful,
10# but WITHOUT ANY WARRANTY; without even the implied warranty of
11# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12# GNU General Public License for more details.
13#
14# You should have received a copy of the GNU General Public License
15# along with Eclat.  If not, see <http://www.gnu.org/licenses/>.
16
17AT_SETUP([gdbm])
18AT_KEYWORDS([map gdbmmap])
19
20AT_DATA([test.conf],
21[map instances {
22	type gdbm;
23	file "instances.db";
24}
25])
26
27AT_DATA([instances.txt],
28[web:i-feed1234
29dbserver:i-12345678
30dbserv:i-deadbeef
31])
32
33AT_CHECK([test -x "$GDBMLOAD" || AT_SKIP_TEST
34$GDBMLOAD instances.db < instances.txt
35eclat --config-file test.conf --test-map instances dbserv],
36[0],
37[i-deadbeef
38])
39
40AT_CLEANUP
41