blob: d96bf9f50b62056455e2724b1da6af04caf0bb48 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
|
# $NetBSD: Makefile,v 1.3 2016/03/27 14:57:50 christos Exp $
#
.include <bsd.own.mk>
TESTSDIR = ${TESTSBASE}/bin/sh/dotcmd
TESTS_SH = t_dotcmd
.if !defined(TEST_SH)
TEST_SH = ${HOST_SH}
.endif
FILESDIR = ${TESTSDIR}/out
# Testing scripts: dotcmd in various scopes includes a file with
# return / break / continue in various scopes.
#
.for cmd_scope in case compound file for func subshell until while
. for cmd in return break continue
FILES += ${cmd}_${cmd_scope}
FILESDIR_${cmd}_${cmd_scope} = ${TESTSDIR}
FILESBUILD_${cmd}_${cmd_scope} = yes
${cmd}_${cmd_scope}: scoped_command
${TEST_SH} ${.CURDIR}/scoped_command '${cmd_scope}' '${cmd}' '${cmd}' \
>'${.TARGET}'
. for dot_scope in case compound file for func subshell until while
FILES += \
${dot_scope}_${cmd}_${cmd_scope} \
out/${dot_scope}_${cmd}_${cmd_scope}.out
FILESDIR_${dot_scope}_${cmd}_${cmd_scope} = ${TESTSDIR}
FILESBUILD_${dot_scope}_${cmd}_${cmd_scope} = yes
FILESMODE_${dot_scope}_${cmd}_${cmd_scope} = ${BINMODE}
${dot_scope}_${cmd}_${cmd_scope}: scoped_command
${TEST_SH} ${.CURDIR}/scoped_command '${dot_scope}' \
'. "${cmd}_${cmd_scope}"' 'dotcmd' 'dotcmd' >'${.TARGET}'
. endfor
. endfor
.endfor
.include <bsd.test.mk>
|