aboutsummaryrefslogtreecommitdiff
blob: 79fa44391772882dc8461fe8dea6c51410b700c0 (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
44
45
46
47
#!/bin/bash
metagen() {
    PYTHONPATH=. ./metagen/main.py "$@"
}

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.