[Midnightbsd-cvs] src [11275] trunk/usr.bin/apply: add tests

laffer1 at midnightbsd.org laffer1 at midnightbsd.org
Tue Jul 3 20:04:12 EDT 2018


Revision: 11275
          http://svnweb.midnightbsd.org/src/?rev=11275
Author:   laffer1
Date:     2018-07-03 20:04:12 -0400 (Tue, 03 Jul 2018)
Log Message:
-----------
add tests

Modified Paths:
--------------
    trunk/usr.bin/apply/Makefile

Added Paths:
-----------
    trunk/usr.bin/apply/tests/
    trunk/usr.bin/apply/tests/Makefile
    trunk/usr.bin/apply/tests/legacy_test.sh
    trunk/usr.bin/apply/tests/regress.00.in
    trunk/usr.bin/apply/tests/regress.00.out
    trunk/usr.bin/apply/tests/regress.01.out
    trunk/usr.bin/apply/tests/regress.01.sh
    trunk/usr.bin/apply/tests/regress.sh

Modified: trunk/usr.bin/apply/Makefile
===================================================================
--- trunk/usr.bin/apply/Makefile	2018-07-04 00:03:14 UTC (rev 11274)
+++ trunk/usr.bin/apply/Makefile	2018-07-04 00:04:12 UTC (rev 11275)
@@ -1,8 +1,15 @@
+# $MidnightBSD$
 #	@(#)Makefile	8.1 (Berkeley) 6/6/93
-# $MidnightBSD$
+# $FreeBSD: stable/10/usr.bin/apply/Makefile 264996 2014-04-27 01:15:10Z jmmv $
 
+.include <bsd.own.mk>
+
 PROG=	apply
 DPADD=	${LIBSBUF}
 LDADD=	-lsbuf
 
+.if ${MK_TESTS} != "no"
+SUBDIR+= tests
+.endif
+
 .include <bsd.prog.mk>

Added: trunk/usr.bin/apply/tests/Makefile
===================================================================
--- trunk/usr.bin/apply/tests/Makefile	                        (rev 0)
+++ trunk/usr.bin/apply/tests/Makefile	2018-07-04 00:04:12 UTC (rev 11275)
@@ -0,0 +1,13 @@
+# $MidnightBSD$
+# $FreeBSD: stable/10/usr.bin/apply/tests/Makefile 313488 2017-02-09 22:49:48Z ngie $
+
+TAP_TESTS_SH=	legacy_test
+
+FILESDIR=	${TESTSDIR}
+FILES=		regress.00.in
+FILES+=		regress.00.out
+FILES+=		regress.01.out
+FILES+=		regress.01.sh
+FILES+=		regress.sh
+
+.include <bsd.test.mk>


Property changes on: trunk/usr.bin/apply/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/apply/tests/legacy_test.sh
===================================================================
--- trunk/usr.bin/apply/tests/legacy_test.sh	                        (rev 0)
+++ trunk/usr.bin/apply/tests/legacy_test.sh	2018-07-04 00:04:12 UTC (rev 11275)
@@ -0,0 +1,6 @@
+#!/bin/sh
+# $FreeBSD: stable/10/usr.bin/apply/tests/legacy_test.sh 263227 2014-03-16 08:04:06Z jmmv $
+
+SRCDIR="$(dirname "${0}")"; export SRCDIR
+
+m4 "${SRCDIR}/../regress.m4" "${SRCDIR}/regress.sh" | sh


Property changes on: trunk/usr.bin/apply/tests/legacy_test.sh
___________________________________________________________________
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/apply/tests/regress.00.in
===================================================================
--- trunk/usr.bin/apply/tests/regress.00.in	                        (rev 0)
+++ trunk/usr.bin/apply/tests/regress.00.in	2018-07-04 00:04:12 UTC (rev 11275)
@@ -0,0 +1 @@
+12345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012


Property changes on: trunk/usr.bin/apply/tests/regress.00.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/apply/tests/regress.00.out
===================================================================
--- trunk/usr.bin/apply/tests/regress.00.out	                        (rev 0)
+++ trunk/usr.bin/apply/tests/regress.00.out	2018-07-04 00:04:12 UTC (rev 11275)
@@ -0,0 +1 @@
+12345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012 12345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012 12345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012 1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789!
 0123456789012


Property changes on: trunk/usr.bin/apply/tests/regress.00.out
___________________________________________________________________
Added: mnbsd:nokeywords
## -0,0 +1 ##
+MidnightBSD=%H
\ No newline at end of property
Added: trunk/usr.bin/apply/tests/regress.01.out
===================================================================
--- trunk/usr.bin/apply/tests/regress.01.out	                        (rev 0)
+++ trunk/usr.bin/apply/tests/regress.01.out	2018-07-04 00:04:12 UTC (rev 11275)
@@ -0,0 +1 @@
+apply: Argument list too long


Property changes on: trunk/usr.bin/apply/tests/regress.01.out
___________________________________________________________________
Added: mnbsd:nokeywords
## -0,0 +1 ##
+MidnightBSD=%H
\ No newline at end of property
Added: trunk/usr.bin/apply/tests/regress.01.sh
===================================================================
--- trunk/usr.bin/apply/tests/regress.01.sh	                        (rev 0)
+++ trunk/usr.bin/apply/tests/regress.01.sh	2018-07-04 00:04:12 UTC (rev 11275)
@@ -0,0 +1,15 @@
+#!/bin/sh
+# $FreeBSD: stable/10/usr.bin/apply/tests/regress.01.sh 204761 2010-03-05 15:23:01Z jh $
+
+SHELL=/bin/sh; export SHELL
+
+ARG_MAX=$(getconf ARG_MAX)
+ARG_MAX_HALF=$((ARG_MAX / 2))
+
+apply 'echo %1 %1 %1' $(jot $ARG_MAX_HALF 1 1 | tr -d '\n') 2>&1
+
+if [ $? -eq 0 ]; then
+	return 1
+else
+	return 0
+fi


Property changes on: trunk/usr.bin/apply/tests/regress.01.sh
___________________________________________________________________
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/apply/tests/regress.sh
===================================================================
--- trunk/usr.bin/apply/tests/regress.sh	                        (rev 0)
+++ trunk/usr.bin/apply/tests/regress.sh	2018-07-04 00:04:12 UTC (rev 11275)
@@ -0,0 +1,10 @@
+# $FreeBSD: stable/10/usr.bin/apply/tests/regress.sh 263227 2014-03-16 08:04:06Z jmmv $
+
+echo 1..2
+
+REGRESSION_START($1)
+
+REGRESSION_TEST(`00', `apply "echo %1 %1 %1 %1" $(cat ${SRCDIR}/regress.00.in)')
+REGRESSION_TEST(`01', `sh ${SRCDIR}/regress.01.sh')
+
+REGRESSION_END()


Property changes on: trunk/usr.bin/apply/tests/regress.sh
___________________________________________________________________
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