Add regression test about reverse line feed to col(1)
This commit is contained in:
parent
0026949c41
commit
b76c241652
@ -514,6 +514,8 @@
|
||||
..
|
||||
cmp
|
||||
..
|
||||
col
|
||||
..
|
||||
comm
|
||||
..
|
||||
cut
|
||||
|
@ -1,6 +1,12 @@
|
||||
# @(#)Makefile 8.1 (Berkeley) 6/6/93
|
||||
# $FreeBSD$
|
||||
|
||||
.include <src.opts.mk>
|
||||
|
||||
PROG= col
|
||||
|
||||
.if ${MK_TESTS} != "no"
|
||||
SUBDIR+= tests
|
||||
.endif
|
||||
|
||||
.include <bsd.prog.mk>
|
||||
|
11
usr.bin/col/tests/Makefile
Normal file
11
usr.bin/col/tests/Makefile
Normal file
@ -0,0 +1,11 @@
|
||||
# $FreeBSD$
|
||||
|
||||
TESTSDIR= ${TESTSBASE}/usr.bin/col
|
||||
|
||||
ATF_TESTS_SH= col
|
||||
|
||||
FILES= rlf.in \
|
||||
rlf2.in
|
||||
FILESDIR= ${TESTSDIR}
|
||||
|
||||
.include <bsd.test.mk>
|
39
usr.bin/col/tests/col.sh
Executable file
39
usr.bin/col/tests/col.sh
Executable file
@ -0,0 +1,39 @@
|
||||
# $FreeBSD$
|
||||
|
||||
atf_test_case rlf
|
||||
|
||||
rlf_head()
|
||||
{
|
||||
atf_set "descr" "testing reverse line feed"
|
||||
}
|
||||
rlf_body()
|
||||
{
|
||||
atf_check \
|
||||
-o inline:"a b\n" \
|
||||
-e empty \
|
||||
-s exit:0 \
|
||||
col < $(atf_get_srcdir)/rlf.in
|
||||
|
||||
atf_check \
|
||||
-o inline:"a b3\n" \
|
||||
-e empty \
|
||||
-s exit:0 \
|
||||
col < $(atf_get_srcdir)/rlf2.in
|
||||
|
||||
atf_check \
|
||||
-o inline:"a b3\n" \
|
||||
-e empty \
|
||||
-s exit:0 \
|
||||
col -x < $(atf_get_srcdir)/rlf2.in
|
||||
|
||||
atf_check \
|
||||
-o inline:"a b3\n" \
|
||||
-e empty \
|
||||
-s exit:0 \
|
||||
col -p < $(atf_get_srcdir)/rlf2.in
|
||||
}
|
||||
|
||||
atf_init_test_cases()
|
||||
{
|
||||
atf_add_test_case rlf
|
||||
}
|
2
usr.bin/col/tests/rlf.in
Normal file
2
usr.bin/col/tests/rlf.in
Normal file
@ -0,0 +1,2 @@
|
||||
a
|
||||
7b
|
2
usr.bin/col/tests/rlf2.in
Normal file
2
usr.bin/col/tests/rlf2.in
Normal file
@ -0,0 +1,2 @@
|
||||
a
|
||||
7b
|
Loading…
Reference in New Issue
Block a user