util-linux.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Lennard Hofmann <lennard.hofmann@web.de>
To: util-linux@vger.kernel.org
Cc: Lennard Hofmann <lennard.hofmann@web.de>
Subject: [PATCH 4/4] tests: column --keep-empty-lines in cols mode
Date: Sun, 20 Sep 2020 15:08:20 +0200	[thread overview]
Message-ID: <20200920130818.29756-3-lennard.hofmann@web.de> (raw)
In-Reply-To: <20200920130818.29756-1-lennard.hofmann@web.de>

Add intentional whitespace to the test file `onecolumn` to test that
`column` ignores it. Add empty lines to the same test file to test that
`column--keep-empty-lines` preserves them.

Signed-off-by: Lennard Hofmann <lennard.hofmann@web.de>
---
 tests/expected/column/columnate-fill-cols-keep-empty | 7 +++++++
 tests/ts/column/columnate                            | 4 ++++
 tests/ts/column/files/onecolumn                      | 5 +++++
 3 files changed, 16 insertions(+)
 create mode 100644 tests/expected/column/columnate-fill-cols-keep-empty

diff --git a/tests/expected/column/columnate-fill-cols-keep-empty b/tests/expected/column/columnate-fill-cols-keep-empty
new file mode 100644
index 000000000..8cc1fdf1f
--- /dev/null
+++ b/tests/expected/column/columnate-fill-cols-keep-empty
@@ -0,0 +1,7 @@
+			FFFFFFFFFFFFFFFFFFF
+AAAAAAAAAAAAAAAAAAAA
+BBBBBBBBBBBBBBBBBBBBB
+CCCCCCCCCCCCCCCC	XXXXXXX
+			YYYYYYYYYYY
+DDDDDDDDDDDDDDDDD	ZZZZZZZZZZZ
+EEEEEEEEEEEEE
diff --git a/tests/ts/column/columnate b/tests/ts/column/columnate
index ebeb0c44f..e80f3b00d 100755
--- a/tests/ts/column/columnate
+++ b/tests/ts/column/columnate
@@ -49,4 +49,8 @@ ts_init_subtest "fill-rows-250"
 $TS_CMD_COLUMN --fillrows -c 250 $TS_SELF/files/onecolumn >> $TS_OUTPUT 2>> $TS_ERRLOG
 ts_finalize_subtest

+ts_init_subtest "fill-cols-keep-empty"
+$TS_CMD_COLUMN --keep-empty-lines -c 60 $TS_SELF/files/onecolumn >> $TS_OUTPUT 2>> $TS_ERRLOG
+ts_finalize_subtest
+
 ts_finalize
diff --git a/tests/ts/column/files/onecolumn b/tests/ts/column/files/onecolumn
index 69ec82f5d..3e579e1d4 100644
--- a/tests/ts/column/files/onecolumn
+++ b/tests/ts/column/files/onecolumn
@@ -1,9 +1,14 @@
+
 AAAAAAAAAAAAAAAAAAAA
 BBBBBBBBBBBBBBBBBBBBB
 CCCCCCCCCCCCCCCC
+
 DDDDDDDDDDDDDDDDD
 EEEEEEEEEEEEE
 FFFFFFFFFFFFFFFFFFF
+
+
 XXXXXXX
 YYYYYYYYYYY
 ZZZZZZZZZZZ
+
--
2.28.0


      parent reply	other threads:[~2020-09-20 13:16 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-20 13:08 [PATCH 2/4] column: Call mbs_to_wcs("") only once Lennard Hofmann
2020-09-20 13:08 ` [PATCH 3/4] column: Deprecate --table-empty-lines in favor of --keep-empty-lines Lennard Hofmann
2020-09-21 13:08   ` Karel Zak
2020-09-20 13:08 ` Lennard Hofmann [this message]

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=20200920130818.29756-3-lennard.hofmann@web.de \
    --to=lennard.hofmann@web.de \
    --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;
as well as URLs for NNTP newsgroup(s).