File: install-remove

package info (click to toggle)
dict-foldoc 20201018-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 5,436 kB
  • sloc: perl: 85; makefile: 55; sh: 47
file content (30 lines) | stat: -rwxr-xr-x 899 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#!/bin/bash

# This should run in a VM where we can start dictd

set -e

# This file should already be installed by the dict package...
test -f /etc/dictd/dict.conf

# But we overwrite it with only localhost.
echo 'server localhost' > /etc/dictd/dict.conf

# And not per-user files exist.
rm -f ~/.dictrc

# Setup done, start testing.

echo test: the foldoc dictionary is available.
dict -D|grep foldoc

echo test: the definition from 'debian' exists in foldoc.
dict debian|grep -q 'From The Free On-line Dictionary of Computing'

echo test: uninstalling foldoc does not find the definition anymore.
apt-get remove -yy --purge -q dict-foldoc
dict debian 2>&1 | grep 'No definitions found for "debian"'

echo test: installing the package finds the definition again.
DEBIAN_FRONTEND=noninteractive apt-get install -yy -q dict-foldoc
dict debian|grep -q 'From The Free On-line Dictionary of Computing'