diff --git a/bin/expr/Makefile b/bin/expr/Makefile index b86cf6686ab0..a1f6cbf21091 100644 --- a/bin/expr/Makefile +++ b/bin/expr/Makefile @@ -1,9 +1,15 @@ # $FreeBSD$ +.include + PROG= expr SRCS= expr.y YFLAGS= NO_WMISSING_VARIABLE_DECLARATIONS= +.if ${MK_TESTS} != "no" +SUBDIR+= tests +.endif + .include diff --git a/bin/expr/tests/Makefile b/bin/expr/tests/Makefile new file mode 100644 index 000000000000..80c130c3df20 --- /dev/null +++ b/bin/expr/tests/Makefile @@ -0,0 +1,16 @@ +# $FreeBSD$ + +OBJTOP= ${.OBJDIR}/../../.. +SRCTOP= ${.CURDIR}/../../.. +TESTSRC= ${SRCTOP}/contrib/netbsd-tests/bin/expr + +TESTSDIR= ${TESTSBASE}/bin/expr + +NETBSD_ATF_TESTS_SH= expr_test + +ATF_TESTS_SH_SED_expr_test+= -e 's/eval expr/eval expr --/g' +ATF_TESTS_SH_SED_expr_test+= -e 's/"expr: integer overflow or underflow occurred for operation.*"/"expr: overflow"/g' + +.include + +.include diff --git a/etc/mtree/BSD.tests.dist b/etc/mtree/BSD.tests.dist index cbd65dc8a6a3..c43f1aea48dc 100644 --- a/etc/mtree/BSD.tests.dist +++ b/etc/mtree/BSD.tests.dist @@ -12,6 +12,8 @@ .. date .. + expr + .. mv .. pax