From: Ruediger Meier Date: Thu, 8 May 2014 15:58:37 +0000 (+0200) Subject: tests: add test case for last -time-format=full X-Git-Tag: v2.25-rc1~194 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ce0aefbd0da77a63d94a4581893e7bb2f494a122;p=thirdparty%2Futil-linux.git tests: add test case for last -time-format=full Signed-off-by: Ruediger Meier --- diff --git a/tests/expected/last/last b/tests/expected/last/last index dfb140b63f..9dbee127a3 100644 --- a/tests/expected/last/last +++ b/tests/expected/last/last @@ -54,7 +54,24 @@ wtmp begins Wed Aug 28 03:00:00 2013 torvalds linux Mon Aug 26 00:57 gone - no logout wtmp begins Wed Aug 28 03:00:00 2013 -~~~ full times ~~~ +~~~ full times shortopt ~~~ +rick long never-gonna-logo Thu Jan 1 00:00:00 1970 - Tue Jan 19 03:14:07 2038 (24855+03:14) +torvalds linux hobby Mon Aug 26 00:57:08 1991 gone - no logout +reboot system boot system-name Wed Aug 28 18:00:00 2013 still running +reboot system boot system-name Wed Aug 28 16:00:00 2013 - Wed Aug 28 17:00:00 2013 (01:00) +IPv4 root dns-server Wed Aug 28 13:00:00 2013 - Wed Aug 28 14:00:00 2013 (01:00) +nonvalid foo zero Wed Aug 28 12:00:00 2013 - down (03:00) +runlevel foo one Wed Aug 28 11:00:00 2013 - Wed Aug 28 12:00:00 2013 (01:00) +sysboot foo two Wed Aug 28 10:00:00 2013 - Wed Aug 28 11:00:00 2013 (01:00) +newtime foo three Wed Aug 28 09:00:00 2013 - Wed Aug 28 10:00:00 2013 (01:00) +oldtime foo four Wed Aug 28 08:00:00 2013 - Wed Aug 28 09:00:00 2013 (01:00) +init foo five Wed Aug 28 07:00:00 2013 - Wed Aug 28 08:00:00 2013 (01:00) +login foo six Wed Aug 28 06:00:00 2013 - Wed Aug 28 07:00:00 2013 (01:00) +user_pro foo seven Wed Aug 28 05:00:00 2013 - Wed Aug 28 06:00:00 2013 (01:00) +accounti foo nine Wed Aug 28 03:00:00 2013 - Wed Aug 28 04:00:00 2013 (01:00) + +wtmp begins Wed Aug 28 03:00:00 2013 +~~~ full times longopt ~~~ rick long never-gonna-logo Thu Jan 1 00:00:00 1970 - Tue Jan 19 03:14:07 2038 (24855+03:14) torvalds linux hobby Mon Aug 26 00:57:08 1991 gone - no logout reboot system boot system-name Wed Aug 28 18:00:00 2013 still running diff --git a/tests/ts/last/last b/tests/ts/last/last index 8e4202fe9b..8ed3102eef 100755 --- a/tests/ts/last/last +++ b/tests/ts/last/last @@ -51,9 +51,12 @@ $TS_CMD_LAST -f $WTMP_FILE -i torvalds >> $TS_OUTPUT 2>/dev/null ts_log "~~~ no host ~~~" $TS_CMD_LAST -f $WTMP_FILE -R torvalds >> $TS_OUTPUT 2>/dev/null -ts_log "~~~ full times ~~~" +ts_log "~~~ full times shortopt ~~~" $TS_CMD_LAST -f $WTMP_FILE -F >> $TS_OUTPUT 2>/dev/null +ts_log "~~~ full times longopt ~~~" +$TS_CMD_LAST -f $WTMP_FILE --time-format=full >> $TS_OUTPUT 2>/dev/null + ts_log "~~~ no time ~~~" $TS_CMD_LAST -f $WTMP_FILE --time-format=notime >> $TS_OUTPUT 2>/dev/null