aboutsummaryrefslogtreecommitdiff
blob: d0c9792521b92d8fcc99ed47b51579fb7068bd9b (plain)
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
handle_error() {
    ret=$?
    echo FAILED. >&2
    exit ${ret}
}
trap handle_error ERR

unset ECHANGELOG_USER
PS4='# '
set -x
########################################
# BEGIN tests
########################################


#Should fail if ECHANGELOG_USER not set:
ECHANGELOG_USER='First Last <mail@example.org>' metagen -m -Q
! metagen -m -Q

metagen -e "someguy@gentoo.org" -d "Maint desc" -Q

metagen -e "someguy@gentoo.org" -n "Jon Doe" -d "Maint desc" -Q

#Should fail if ECHANGELOG_USER not set:
ECHANGELOG_USER='First Last <mail@example.org>' metagen -m -H python -e "foo@bar.com" -d "Foo bar.","Chow fun" -Q
! metagen -m -H python -e "foo@bar.com" -d "Foo bar.","Chow fun" -Q

#Should fail:
! metagen -Q

#Should fail:
! metagen -l "Long desc" -Q

#Should fail:
! metagen -d "Maintainer desc" -Q


########################################
# END tests
########################################
echo
echo PASSED.