Debian Codegraph @

debian/tests/install-remove

raw
1 #!/bin/bash
2
3 # This should run in a VM where we can start dictd
4
5 set -e
6
7 # This file should already be installed by the dict package...
8 test -f /etc/dictd/dict.conf
9
10 # But we overwrite it with only localhost.
11 echo 'server localhost' > /etc/dictd/dict.conf
12
13 # And not per-user files exist.
14 rm -f ~/.dictrc
15
16 # Setup done, start testing.
17
18 echo test: the foldoc dictionary is available.
19 dict -D|grep foldoc
20
21 echo test: the definition from 'debian' exists in foldoc.
22 dict debian|grep -q 'From The Free On-line Dictionary of Computing'
23
24 echo test: uninstalling foldoc does not find the definition anymore.
25 apt-get remove -yy --purge -q dict-foldoc
26 dict debian 2>&1 | grep 'No definitions found for "debian"'
27
28 echo test: installing the package finds the definition again.
29 DEBIAN_FRONTEND=noninteractive apt-get install -yy -q dict-foldoc
30 dict debian|grep -q 'From The Free On-line Dictionary of Computing'