From 6d0b6f70e0b736295aa700ae668b69f720f610e2 Mon Sep 17 00:00:00 2001 From: Sami Kerola Date: Sat, 19 Jan 2013 00:08:52 +0000 Subject: [PATCH] tests: add utmpdump(1) check Signed-off-by: Sami Kerola --- tests/commands.sh | 2 ++ tests/expected/utmpdump/to-binary | Bin 0 -> 3840 bytes tests/expected/utmpdump/to-text | 10 ++++++++++ tests/ts/utmpdump/binary | Bin 0 -> 3840 bytes tests/ts/utmpdump/text | 10 ++++++++++ tests/ts/utmpdump/to-binary | 23 +++++++++++++++++++++++ tests/ts/utmpdump/to-text | 23 +++++++++++++++++++++++ 7 files changed, 68 insertions(+) create mode 100644 tests/expected/utmpdump/to-binary create mode 100644 tests/expected/utmpdump/to-text create mode 100644 tests/ts/utmpdump/binary create mode 100644 tests/ts/utmpdump/text create mode 100755 tests/ts/utmpdump/to-binary create mode 100755 tests/ts/utmpdump/to-text diff --git a/tests/commands.sh b/tests/commands.sh index f1643a685f..73725c9f89 100644 --- a/tests/commands.sh +++ b/tests/commands.sh @@ -64,3 +64,5 @@ TS_CMD_FINDMNT=${TS_CMD_FINDMNT-"$top_builddir/findmnt"} TS_CMD_FDISK=${TS_CMD_FDISK-"$top_builddir/fdisk"} TS_CMD_HEXDUMP=${TS_CMD_HEXDUMP-"$top_builddir/hexdump"} + +TS_CMD_UTMPDUMP=${TS_CMD_UTMPDUMP-"$top_builddir/utmpdump"} diff --git a/tests/expected/utmpdump/to-binary b/tests/expected/utmpdump/to-binary new file mode 100644 index 0000000000000000000000000000000000000000..45d35bbb0ba5f1c3db170f18b1a4da1c7f92cf61 GIT binary patch literal 3840 zc-muUU|?9}#K2HcQmk*tfE$3Mvr~)ma}tXaajCH~&@*5d1q`0n-vfwM%MQdrVUX}Q z!XN%dqv1~+sI?(2{DTuA;ctvT{EbJ$pE%(9miX}Jpknxs0tlG+mbCQ0w0t!EQxhEj zL0bB!R``zs2-y9fwD6}^{W}UE;0B4|Pp$UnC?GxjLFK| $TS_OUTPUT 2>/dev/null + +ts_finalize diff --git a/tests/ts/utmpdump/to-text b/tests/ts/utmpdump/to-text new file mode 100755 index 0000000000..f454e5fd8b --- /dev/null +++ b/tests/ts/utmpdump/to-text @@ -0,0 +1,23 @@ +#!/bin/bash + +# This file is part of util-linux. +# +# This file is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This file is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +TS_TOPDIR="$(dirname $0)/../.." +TS_DESC="to-text" + +. $TS_TOPDIR/functions.sh +ts_init "$*" + +$TS_CMD_UTMPDUMP $TS_SELF/binary >| $TS_OUTPUT 2>/dev/null + +ts_finalize -- 2.47.2