]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
col: improve error message, update regression test
authorKarel Zak <kzak@redhat.com>
Tue, 5 Feb 2019 17:07:26 +0000 (18:07 +0100)
committerKarel Zak <kzak@redhat.com>
Tue, 5 Feb 2019 17:07:26 +0000 (18:07 +0100)
Signed-off-by: Karel Zak <kzak@redhat.com>
tests/expected/col/multibyte
text-utils/col.c

index c6d36cce3bee6591b7fe7cb4e118cf98b7526662..4e299adc1bfb0b5676a966584e78bc76b581732c 100644 (file)
@@ -1 +1 @@
-col: Invalid or incomplete multibyte or wide character
+col: failed on line 1: Invalid or incomplete multibyte or wide character
index c6b2bdf568e50fa100032e0649adba869d6a9df9..1ba195e246ad1a3ec6713b95a24dc919e303e922 100644 (file)
@@ -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;