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
|
#!/bin/sh
set -e
WORKDIR=${AUTOPKGTEST_TMP:-$ADT_TMP}
cc -Wall $(pkg-config --cflags unibilium) -o "$WORKDIR"/tdump debian/tests/terminfo-dump.c $(pkg-config --libs unibilium)
cd "$WORKDIR"
FAIL=0
TESTS=0
for term in ansi xterm screen rxvt-unicode; do
libterm=/lib/terminfo/${term%${term#?}}/${term}
usrterm=/usr/share/terminfo/${term%${term#?}}/${term}
if [ -e "$libterm" ]; then
printf "# Parsing $libterm ...\\n"
TESTS=$((TESTS + 1))
./tdump "$libterm" || FAIL=1
elif [ -e "$usrterm" ]; then
printf "# Parsing $usrterm ...\\n"
TESTS=$((TESTS + 1))
./tdump "$usrterm" || FAIL=1
fi
if [ -e "${libterm}-256color" ]; then
printf "# Parsing ${libterm}-256color ...\\n"
TESTS=$((TESTS + 1))
./tdump "${libterm}-256color" || FAIL=1
elif [ -e "${usrterm}-256color" ]; then
printf "# Parsing ${usrterm}-256color ...\\n"
TESTS=$((TESTS + 1))
./tdump "${usrterm}-256color" || FAIL=1
fi
done
printf "1..${TESTS}\\n"
exit $FAIL
|