summaryrefslogtreecommitdiff
path: root/test/integration/test-history
blob: 47829e1629d3ef98bb7ef0024848a37a2425313d (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
#!/bin/sh
set -e

TESTDIR="$(readlink -f "$(dirname "$0")")"
. "$TESTDIR/framework"
setupenvironment
configarchitecture 'amd64'

buildsimplenativepackage 'pkg1' 'amd64' '1' 'stable'
buildsimplenativepackage 'pkg2' 'amd64' '1' 'stable'


setupaptarchive

cathistory() {
    sed rootdir/var/log/apt/history.log -re 's/^(Commandline|Start-Date|End-Date):.*/\1: dummy/'
}


testsuccess aptget install pkg1

testequal "
Start-Date: dummy
Commandline: dummy
Install: pkg1:amd64 (1)
End-Date: dummy" cathistory

testsuccess aptget install pkg2 --comment="A test comment"

testequal "
Start-Date: dummy
Commandline: dummy
Install: pkg1:amd64 (1)
End-Date: dummy

Start-Date: dummy
Commandline: dummy
Comment: A test comment
Install: pkg2:amd64 (1)
End-Date: dummy" cathistory