summaryrefslogtreecommitdiff
path: root/test/integration
diff options
context:
space:
mode:
authorJulian Andres Klode <jak@debian.org>2025-09-26 16:18:42 +0000
committerJulian Andres Klode <jak@debian.org>2025-09-26 16:18:42 +0000
commit0b6f688806098b906d0c34f101696d35a60cf778 (patch)
treeeb72d44c499404fd46c04119e7e5fb214f7833f2 /test/integration
parent3c9399e643a07074d47c9bceca88e8d43ff55d36 (diff)
parent66962bee233b617e4a9ce436f9b26875511b35e6 (diff)
Merge branch 'history-command' into 'main'
History Command and Parsing See merge request apt-team/apt!516
Diffstat (limited to 'test/integration')
-rwxr-xr-xtest/integration/test-history30
1 files changed, 30 insertions, 0 deletions
diff --git a/test/integration/test-history b/test/integration/test-history
index 47829e162..34489fce6 100755
--- a/test/integration/test-history
+++ b/test/integration/test-history
@@ -38,3 +38,33 @@ Commandline: dummy
Comment: A test comment
Install: pkg2:amd64 (1)
End-Date: dummy" cathistory
+
+normalizedinfo() {
+ apt history-info 0 | sed -E \
+ -e 's/^( *-?Start time *: ).*/\1dummy/' \
+ -e 's/^( *-?End time *: ).*/\1dummy/' \
+ -e 's|^( *-?Command line *: ).*|\1dummy|'
+}
+
+testsuccessequal "Transaction ID: 0
+Start time: dummy
+End time: dummy
+Requested by:
+Command line: dummy
+Packages changed:
+ Install pkg1:amd64 (1)
+" normalizedinfo
+
+# replace aribtrary command line and date with "dummy".
+normalizedlist() {
+ apt history-list | sed -E 's/^([0-9]+)[[:space:]]+'\
+'[^[:space:]]+[[:space:]]+'\
+'[0-9]{4}-[0-9]{2}-[0-9]{2}[[:space:]]+'\
+'[0-9]{2}:[0-9]{2}:[0-9]{2}/'\
+'\1 dummy dummy /'
+}
+
+testsuccessequal "ID Command line Date and Time Action Changes
+
+0 dummy dummy Install 1
+1 dummy dummy Install 1 " normalizedlist