+if [ -n "$SUDO_USER" ]; then
+ testfileequal 'rootdir/var/log/apt/history.log' "
+Requested-By: $SUDO_USER ($(id -u "$SUDO_USER"))
+Install: old-pkg:native (1)
+
+Requested-By: $SUDO_USER ($(id -u "$SUDO_USER"))
+Install: new-pkg:native (2, automatic)
+Upgrade: old-pkg:native (1, 2)
+Disappeared: old-pkg (1)"
+else
+ testfileequal 'rootdir/var/log/apt/history.log' '
+Install: old-pkg:native (1)