From: Karel Zak Date: Tue, 5 Feb 2019 17:07:26 +0000 (+0100) Subject: col: improve error message, update regression test X-Git-Tag: v2.34-rc1~128 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cc06250f116d899f656b0c8415cd955c01ef63a1;p=thirdparty%2Futil-linux.git col: improve error message, update regression test Signed-off-by: Karel Zak --- diff --git a/tests/expected/col/multibyte b/tests/expected/col/multibyte index c6d36cce3b..4e299adc1b 100644 --- a/tests/expected/col/multibyte +++ b/tests/expected/col/multibyte @@ -1 +1 @@ -col: Invalid or incomplete multibyte or wide character +col: failed on line 1: Invalid or incomplete multibyte or wide character diff --git a/text-utils/col.c b/text-utils/col.c index c6b2bdf568..1ba195e246 100644 --- a/text-utils/col.c +++ b/text-utils/col.c @@ -243,7 +243,7 @@ int main(int argc, char **argv) errno = 0; if ((ch = getwchar()) == WEOF) { if (errno == EILSEQ) { - warn(_("failed on line %d"), max_line); + warn(_("failed on line %d"), max_line + 1); ret = EXIT_FAILURE; } break;