File: xlsfonts

package info (click to toggle)
bedstead 3.261-1
  • links: PTS, VCS
  • area: non-free
  • in suites: forky, sid
  • size: 592 kB
  • sloc: ansic: 4,607; python: 337; makefile: 138; sh: 71
file content (43 lines) | stat: -rw-r--r-- 1,108 bytes parent folder | download | duplicates (2)
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
31
32
33
34
35
36
37
38
39
40
41
42
43
#! /bin/bash

set -xeuo pipefail

if [ -z "${DISPLAY-}" ]; then
    exec xvfb-run -a "$0"
fi

# Check that the X server can find all of the Bedstead fonts that
# should be installed.  This doesn't check the precise output of
# xlsfonts just in case there are extra fonts that match.

cd -- "${AUTOPKGTEST_TMP}"

sort >expected <<EOF
-bjh21-bedstead-bold-r-normal--0-0-75-75-c-0-iso10646-1
-bjh21-bedstead-bold-r-normal--193-20-75-75-c-120-iso10646-1
-bjh21-bedstead-medium-r-normal--0-0-75-75-c-0-iso10646-1
-bjh21-bedstead-medium-r-normal--193-20-75-75-c-120-iso10646-1
-bjh21-bedstead-medium-r-normal--96-10-75-75-c-60-iso10646-1
EOF

xlsfonts -fn '-bjh21-bedstead-*' | sort >actual

cat actual

comm -13 actual expected >missing

if [ -s missing ]; then
    cat missing
    exit 1
fi

# Check that each alias maps to precisely one font.
for a in bedstead-10 bedstead-20 bedstead-bold-20; do
    count="$(xlsfonts "$a" | wc -l)"
    if [ "$count" -eq 1 ]; then
        : "xlsfonts $a correctly returned one result"
    else
        : "xlsfonts $a returned $count results, not 1"
        exit 1
    fi
done