File: run-unit-test

package info (click to toggle)
letterize 1.5-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 136 kB
  • sloc: ansic: 189; makefile: 131; sh: 14
file content (23 lines) | stat: -rw-r--r-- 507 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
#!/bin/bash
set -e

if [ "$AUTOPKGTEST_TMP" = "" ] ; then
  AUTOPKGTEST_TMP=`mktemp -d /tmp/${pkg}-test.XXXXXX`
  trap "rm -rf $AUTOPKGTEST_TMP" 0 INT QUIT ABRT PIPE TERM
fi

cd $AUTOPKGTEST_TMP

echo "Test functionality"

letterize 98 > test1
letterize 76452 > test2

# Checking the output is indeed what we asked for
echo "ba8b09ebb2cb1dc84c9ac9e42869df68 test1" > checksums
echo "c6e3602db0c45173bfaac6e4655ae08c test2" >> checksums
md5sum --check checksums

# Clean up
rm -f test* checksums
echo "PASS"