From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: util-linux-owner@vger.kernel.org Received: from mail-wi0-f170.google.com ([209.85.212.170]:39522 "EHLO mail-wi0-f170.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751835Ab3ASAJZ (ORCPT ); Fri, 18 Jan 2013 19:09:25 -0500 Received: by mail-wi0-f170.google.com with SMTP id hq7so911262wib.1 for ; Fri, 18 Jan 2013 16:09:23 -0800 (PST) From: Sami Kerola To: util-linux@vger.kernel.org Cc: kerolasa@iki.fi Subject: [PATCH 03/22] tests: add utmpdump(1) check Date: Sat, 19 Jan 2013 00:08:52 +0000 Message-Id: <1358554151-25985-4-git-send-email-kerolasa@iki.fi> In-Reply-To: <1358554151-25985-1-git-send-email-kerolasa@iki.fi> References: <1358554151-25985-1-git-send-email-kerolasa@iki.fi> Sender: util-linux-owner@vger.kernel.org List-ID: 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 f1643a6..73725c9 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 zcmZQ)U|?9}#K2HcQmk(XWa9!L>Fm^^{G7z%L|kgD4D<|e$&Dm&PwVdi#QK*Vs4yrD z68=VbGy%ikXf*us1Q3!`tqp169}G;F{VAV)#?5 r{Ygzf3}v%O34c)eZ&^Ls{-Fm^^{G7z%L|kgD4D<|e$&Dm&PwVdi#QK*Vs4yrD z68=VbGy%ikXf*us1Q3!`tqp169}G;F{VAV)#?5 r{Ygzf3}v%O34c)eZ&^Ls{-| $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 0000000..f454e5f --- /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 -- 1.8.1.1