+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.0)
+
+Requested-By: $SUDO_USER ($(id -u "$SUDO_USER"))
+Install: new-pkg:native (2.0, automatic)
+Upgrade: old-pkg:native (1.0, 2.0)
+Disappeared: old-pkg (1.0)"
+else
+ testfileequal 'rootdir/var/log/apt/history.log' '