public inbox for util-linux@vger.kernel.org
 help / color / mirror / Atom feed
From: Sami Kerola <kerolasa@iki.fi>
To: util-linux@vger.kernel.org
Cc: kerolasa@iki.fi
Subject: [PATCH 8/9] tests: add isosize --sectors and --divisor tests
Date: Sun, 16 Feb 2014 23:54:21 +0000	[thread overview]
Message-ID: <1392594862-15807-8-git-send-email-kerolasa@iki.fi> (raw)
In-Reply-To: <1392594862-15807-1-git-send-email-kerolasa@iki.fi>

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
---
 tests/expected/isosize/print-size                |  1 -
 tests/expected/isosize/print-size-default_output |  1 +
 tests/expected/isosize/print-size-divisor_output |  1 +
 tests/expected/isosize/print-size-sector_output  |  1 +
 tests/ts/isosize/print-size                      | 13 ++++++++++++-
 5 files changed, 15 insertions(+), 2 deletions(-)
 delete mode 100644 tests/expected/isosize/print-size
 create mode 100644 tests/expected/isosize/print-size-default_output
 create mode 100644 tests/expected/isosize/print-size-divisor_output
 create mode 100644 tests/expected/isosize/print-size-sector_output

diff --git a/tests/expected/isosize/print-size b/tests/expected/isosize/print-size
deleted file mode 100644
index 3def437..0000000
--- a/tests/expected/isosize/print-size
+++ /dev/null
@@ -1 +0,0 @@
-515899392
diff --git a/tests/expected/isosize/print-size-default_output b/tests/expected/isosize/print-size-default_output
new file mode 100644
index 0000000..3def437
--- /dev/null
+++ b/tests/expected/isosize/print-size-default_output
@@ -0,0 +1 @@
+515899392
diff --git a/tests/expected/isosize/print-size-divisor_output b/tests/expected/isosize/print-size-divisor_output
new file mode 100644
index 0000000..ee214a6
--- /dev/null
+++ b/tests/expected/isosize/print-size-divisor_output
@@ -0,0 +1 @@
+57322154
diff --git a/tests/expected/isosize/print-size-sector_output b/tests/expected/isosize/print-size-sector_output
new file mode 100644
index 0000000..dff3634
--- /dev/null
+++ b/tests/expected/isosize/print-size-sector_output
@@ -0,0 +1 @@
+sector count: 251904, sector size: 2048
diff --git a/tests/ts/isosize/print-size b/tests/ts/isosize/print-size
index 312fdc1..277c124 100755
--- a/tests/ts/isosize/print-size
+++ b/tests/ts/isosize/print-size
@@ -20,7 +20,18 @@ ts_init "$*"
 
 ts_check_test_command "$TS_CMD_ISOSIZE"
 
-gzip -cd $TS_SELF/sample.iso.gz > $TS_OUTDIR/sample.iso
+gzip -cd $TS_SELF/sample.iso.gz >| $TS_OUTDIR/sample.iso
+
+ts_init_subtest "default_output"
 $TS_CMD_ISOSIZE $TS_OUTDIR/sample.iso >| $TS_OUTPUT 2>&1
+ts_finalize_subtest
+
+ts_init_subtest "sector_output"
+$TS_CMD_ISOSIZE --sectors $TS_OUTDIR/sample.iso &> $TS_OUTPUT 2>&1
+ts_finalize_subtest
+
+ts_init_subtest "divisor_output"
+$TS_CMD_ISOSIZE --divisor=9 $TS_OUTDIR/sample.iso &> $TS_OUTPUT 2>&1
+ts_finalize_subtest
 
 ts_finalize
-- 
1.9.0


  parent reply	other threads:[~2014-02-16 23:54 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-16 23:54 [PATCH 1/9] tests: avoid executing dirname(1) command Sami Kerola
2014-02-16 23:54 ` [PATCH 2/9] tests: make tests to run parallel Sami Kerola
2014-02-17 14:11   ` Karel Zak
2014-02-16 23:54 ` [PATCH 3/9] tools: add usage information to checkconfig.sh Sami Kerola
2014-02-16 23:54 ` [PATCH 4/9] docs: make hexdump.1 color specification easier to understand Sami Kerola
2014-02-16 23:54 ` [PATCH 5/9] tests: align last.1 with recent phantom detection Sami Kerola
2014-02-16 23:54 ` [PATCH 6/9] swaplabel: wrong version number in check Sami Kerola
2014-02-16 23:54 ` [PATCH 7/9] isosize: move file name printing after error determination Sami Kerola
2014-02-16 23:54 ` Sami Kerola [this message]
2014-02-16 23:54 ` [PATCH 9/9] isosize: make --divisor to require argument Sami Kerola

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1392594862-15807-8-git-send-email-kerolasa@iki.fi \
    --to=kerolasa@iki.fi \
    --cc=util-linux@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox