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
|
#! /bin/sh
set -e
echo running $0
test_this() {
echo
echo "running $@"
"$@"
}
WORKDIR=$(mktemp -d)
trap "rm -rf $WORKDIR" 0 INT QUIT ABRT PIPE TERM
cd $WORKDIR
REPORTBUGEMAIL=debian-reportbug@lists.debian.org
export REPORTBUGEMAIL
test_this reportbug --version
test_this reportbug --draftpath . --template reportbug | tee outfile
test_this grep -q "^Subject: reportbug: none$" outfile
test_this grep -q "^Package: reportbug$" outfile
test_this grep -q "^Severity: wishlist$" outfile
test_this grep -q "^-- Package-specific info:$" outfile
test_this grep -q "^-- System Information:$" outfile
|