]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Don't read the newline character to line buffer because lines are passed
authorJaakko Heinonen <jh@FreeBSD.org>
Sat, 12 Dec 2009 18:18:46 +0000 (18:18 +0000)
committerJaakko Heinonen <jh@FreeBSD.org>
Sat, 12 Dec 2009 18:18:46 +0000 (18:18 +0000)
commitd8eba599f5e230965a7c7f5fea862da1907087de
treebaf10a3cfd8781a67dfd541bad7dcfd9be5bec94
parent28c3507d53a66045b9a961be7c47a41e27c60308
Don't read the newline character to line buffer because lines are passed
to wcscoll(3). Newline characters could cause incorrect results when
comparing lines.

Also, if an input line didn't contain a newline character, it was
omitted from the output. According to my interpretation, SUSv3 requires
that the newline is always printed.

Add regression tests for the cases. [1]

PR: bin/140976
Submitted by: D'Arcy Cain (original version) [1]
Approved by: trasz (mentor)
14 files changed:
tools/regression/usr.bin/Makefile
tools/regression/usr.bin/comm/Makefile [new file with mode: 0644]
tools/regression/usr.bin/comm/regress.00.out [new file with mode: 0644]
tools/regression/usr.bin/comm/regress.00a.in [new file with mode: 0644]
tools/regression/usr.bin/comm/regress.00b.in [new file with mode: 0644]
tools/regression/usr.bin/comm/regress.01.out [new file with mode: 0644]
tools/regression/usr.bin/comm/regress.01a.in [new file with mode: 0644]
tools/regression/usr.bin/comm/regress.01b.in [new file with mode: 0644]
tools/regression/usr.bin/comm/regress.02.out [new file with mode: 0644]
tools/regression/usr.bin/comm/regress.02a.in [new file with mode: 0644]
tools/regression/usr.bin/comm/regress.02b.in [new file with mode: 0644]
tools/regression/usr.bin/comm/regress.sh [new file with mode: 0644]
tools/regression/usr.bin/comm/regress.t [new file with mode: 0644]
usr.bin/comm/comm.c