summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorJulian Andres Klode <jak@debian.org>2024-11-18 19:38:38 +0000
committerJulian Andres Klode <jak@debian.org>2024-11-18 19:38:38 +0000
commit11f4008435e818d68453ead836665bdd8f4c404f (patch)
tree3eab8ab3246c6db88f5a7844dfd89de09aec8bd7 /test
parent250705263e24a8be5e509df1fd3ffda0492f8ea7 (diff)
parent1c4fa81cc398e21868ad237509f1ea8e772d76de (diff)
Merge branch 'history-comment' into 'main'
Add a --comment option to record Comment: in history See merge request apt-team/apt!401
Diffstat (limited to 'test')
-rwxr-xr-xtest/integration/test-history40
1 files changed, 40 insertions, 0 deletions
diff --git a/test/integration/test-history b/test/integration/test-history
new file mode 100755
index 000000000..47829e162
--- /dev/null
+++ b/test/integration/test-history
@@ -0,0 +1,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