| 1 |
#! /bin/sh |
| 2 |
|
| 3 |
set -e |
| 4 |
|
| 5 |
echo running $0 |
| 6 |
|
| 7 |
test_this() { |
| 8 |
echo |
| 9 |
echo "running $@" |
| 10 |
"$@" |
| 11 |
} |
| 12 |
|
| 13 |
WORKDIR=$(mktemp -d) |
| 14 |
trap "rm -rf $WORKDIR" 0 INT QUIT ABRT PIPE TERM |
| 15 |
cd $WORKDIR |
| 16 |
|
| 17 |
[email protected] |
| 18 |
export REPORTBUGEMAIL |
| 19 |
|
| 20 |
test_this reportbug --version |
| 21 |
|
| 22 |
test_this reportbug --draftpath . --template reportbug | tee outfile |
| 23 |
|
| 24 |
test_this grep -q "^Subject: reportbug: none$" outfile |
| 25 |
test_this grep -q "^Package: reportbug$" outfile |
| 26 |
test_this grep -q "^Severity: wishlist$" outfile |
| 27 |
test_this grep -q "^-- Package-specific info:$" outfile |
| 28 |
test_this grep -q "^-- System Information:$" outfile |