[Midnightbsd-cvs] src [11574] trunk/usr.bin/col/tests: add tests

laffer1 at midnightbsd.org laffer1 at midnightbsd.org
Sun Jul 8 11:32:45 EDT 2018


Revision: 11574
          http://svnweb.midnightbsd.org/src/?rev=11574
Author:   laffer1
Date:     2018-07-08 11:32:44 -0400 (Sun, 08 Jul 2018)
Log Message:
-----------
add tests

Added Paths:
-----------
    trunk/usr.bin/col/tests/
    trunk/usr.bin/col/tests/Makefile
    trunk/usr.bin/col/tests/col_test.sh
    trunk/usr.bin/col/tests/rlf.in
    trunk/usr.bin/col/tests/rlf2.in

Added: trunk/usr.bin/col/tests/Makefile
===================================================================
--- trunk/usr.bin/col/tests/Makefile	                        (rev 0)
+++ trunk/usr.bin/col/tests/Makefile	2018-07-08 15:32:44 UTC (rev 11574)
@@ -0,0 +1,10 @@
+# $MidnightBSD$
+# $FreeBSD: stable/10/usr.bin/col/tests/Makefile 316257 2017-03-30 06:20:58Z ngie $
+
+ATF_TESTS_SH=	col_test
+
+FILES=		rlf.in \
+		rlf2.in
+FILESDIR=	${TESTSDIR}
+
+.include <bsd.test.mk>


Property changes on: trunk/usr.bin/col/tests/Makefile
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+MidnightBSD=%H
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Added: trunk/usr.bin/col/tests/col_test.sh
===================================================================
--- trunk/usr.bin/col/tests/col_test.sh	                        (rev 0)
+++ trunk/usr.bin/col/tests/col_test.sh	2018-07-08 15:32:44 UTC (rev 11574)
@@ -0,0 +1,33 @@
+# $MidnightBSD$
+
+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	b\n" \
+		-e empty \
+		-s exit:0 \
+		col < $(atf_get_srcdir)/rlf2.in
+
+	atf_check \
+		-o inline:"a       b\n" \
+		-e empty \
+		-s exit:0 \
+		col -x < $(atf_get_srcdir)/rlf2.in
+}
+
+atf_init_test_cases()
+{
+	atf_add_test_case rlf
+}


Property changes on: trunk/usr.bin/col/tests/col_test.sh
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+MidnightBSD=%H
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Added: trunk/usr.bin/col/tests/rlf.in
===================================================================
--- trunk/usr.bin/col/tests/rlf.in	                        (rev 0)
+++ trunk/usr.bin/col/tests/rlf.in	2018-07-08 15:32:44 UTC (rev 11574)
@@ -0,0 +1,2 @@
+a
+  7b


Property changes on: trunk/usr.bin/col/tests/rlf.in
___________________________________________________________________
Added: mnbsd:nokeywords
## -0,0 +1 ##
+MidnightBSD=%H
\ No newline at end of property
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Added: trunk/usr.bin/col/tests/rlf2.in
===================================================================
--- trunk/usr.bin/col/tests/rlf2.in	                        (rev 0)
+++ trunk/usr.bin/col/tests/rlf2.in	2018-07-08 15:32:44 UTC (rev 11574)
@@ -0,0 +1,2 @@
+a
+	7b


Property changes on: trunk/usr.bin/col/tests/rlf2.in
___________________________________________________________________
Added: mnbsd:nokeywords
## -0,0 +1 ##
+MidnightBSD=%H
\ No newline at end of property
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property


More information about the Midnightbsd-cvs mailing list