head	1.3;
access;
symbols
	netbsd-11-0-RC4:1.3
	netbsd-11-0-RC3:1.3
	netbsd-11-0-RC2:1.3
	netbsd-11-0-RC1:1.3
	perseant-exfatfs-base-20250801:1.3
	netbsd-11:1.3.0.30
	netbsd-11-base:1.3
	netbsd-10-1-RELEASE:1.3
	perseant-exfatfs-base-20240630:1.3
	perseant-exfatfs:1.3.0.28
	perseant-exfatfs-base:1.3
	netbsd-8-3-RELEASE:1.3
	netbsd-9-4-RELEASE:1.3
	netbsd-10-0-RELEASE:1.3
	netbsd-10-0-RC6:1.3
	netbsd-10-0-RC5:1.3
	netbsd-10-0-RC4:1.3
	netbsd-10-0-RC3:1.3
	netbsd-10-0-RC2:1.3
	netbsd-10-0-RC1:1.3
	netbsd-10:1.3.0.26
	netbsd-10-base:1.3
	netbsd-9-3-RELEASE:1.3
	cjep_sun2x-base1:1.3
	cjep_sun2x:1.3.0.24
	cjep_sun2x-base:1.3
	cjep_staticlib_x-base1:1.3
	netbsd-9-2-RELEASE:1.3
	cjep_staticlib_x:1.3.0.22
	cjep_staticlib_x-base:1.3
	netbsd-9-1-RELEASE:1.3
	phil-wifi-20200421:1.3
	phil-wifi-20200411:1.3
	is-mlppp:1.3.0.20
	is-mlppp-base:1.3
	phil-wifi-20200406:1.3
	netbsd-8-2-RELEASE:1.3
	netbsd-9-0-RELEASE:1.3
	netbsd-9-0-RC2:1.3
	netbsd-9-0-RC1:1.3
	phil-wifi-20191119:1.3
	netbsd-9:1.3.0.18
	netbsd-9-base:1.3
	phil-wifi-20190609:1.3
	netbsd-8-1-RELEASE:1.3
	netbsd-8-1-RC1:1.3
	pgoyette-compat-merge-20190127:1.3
	pgoyette-compat-20190127:1.3
	pgoyette-compat-20190118:1.3
	pgoyette-compat-1226:1.3
	pgoyette-compat-1126:1.3
	pgoyette-compat-1020:1.3
	pgoyette-compat-0930:1.3
	pgoyette-compat-0906:1.3
	netbsd-7-2-RELEASE:1.2
	pgoyette-compat-0728:1.3
	netbsd-8-0-RELEASE:1.3
	phil-wifi:1.3.0.16
	phil-wifi-base:1.3
	pgoyette-compat-0625:1.3
	netbsd-8-0-RC2:1.3
	pgoyette-compat-0521:1.3
	pgoyette-compat-0502:1.3
	pgoyette-compat-0422:1.3
	netbsd-8-0-RC1:1.3
	pgoyette-compat-0415:1.3
	pgoyette-compat-0407:1.3
	pgoyette-compat-0330:1.3
	pgoyette-compat-0322:1.3
	pgoyette-compat-0315:1.3
	netbsd-7-1-2-RELEASE:1.2
	pgoyette-compat:1.3.0.14
	pgoyette-compat-base:1.3
	netbsd-7-1-1-RELEASE:1.2
	matt-nb8-mediatek:1.3.0.12
	matt-nb8-mediatek-base:1.3
	perseant-stdc-iso10646:1.3.0.10
	perseant-stdc-iso10646-base:1.3
	netbsd-8:1.3.0.8
	netbsd-8-base:1.3
	prg-localcount2-base3:1.3
	prg-localcount2-base2:1.3
	prg-localcount2-base1:1.3
	prg-localcount2:1.3.0.6
	prg-localcount2-base:1.3
	pgoyette-localcount-20170426:1.3
	bouyer-socketcan-base1:1.3
	pgoyette-localcount-20170320:1.3
	netbsd-7-1:1.2.0.12
	netbsd-7-1-RELEASE:1.2
	netbsd-7-1-RC2:1.2
	netbsd-7-nhusb-base-20170116:1.2
	bouyer-socketcan:1.3.0.4
	bouyer-socketcan-base:1.3
	pgoyette-localcount-20170107:1.3
	netbsd-7-1-RC1:1.2
	pgoyette-localcount-20161104:1.3
	netbsd-7-0-2-RELEASE:1.2
	localcount-20160914:1.3
	netbsd-7-nhusb:1.2.0.10
	netbsd-7-nhusb-base:1.2
	pgoyette-localcount-20160806:1.3
	pgoyette-localcount-20160726:1.3
	pgoyette-localcount:1.3.0.2
	pgoyette-localcount-base:1.3
	netbsd-7-0-1-RELEASE:1.2
	netbsd-7-0:1.2.0.8
	netbsd-7-0-RELEASE:1.2
	netbsd-7-0-RC3:1.2
	netbsd-7-0-RC2:1.2
	netbsd-7-0-RC1:1.2
	tls-maxphys-base:1.2
	tls-maxphys:1.2.0.6
	netbsd-7:1.2.0.4
	netbsd-7-base:1.2
	tls-earlyentropy:1.2.0.2
	tls-earlyentropy-base:1.2;
locks; strict;
comment	@# @;


1.3
date	2016.03.27.14.57.50;	author christos;	state Exp;
branches;
next	1.2;
commitid	fuAiBGXyJLEK9i0z;

1.2
date	2014.07.27.14.24.17;	author apb;	state Exp;
branches
	1.2.2.1
	1.2.6.1;
next	1.1;
commitid	kCR63sqG5w4Wx1Kx;

1.1
date	2014.05.31.14.29.06;	author christos;	state Exp;
branches;
next	;
commitid	yODC4BejrspOoHCx;

1.2.2.1
date	2014.07.27.14.24.17;	author tls;	state dead;
branches;
next	1.2.2.2;
commitid	8ZVdBEH9XlgKCMLx;

1.2.2.2
date	2014.08.10.06.57.02;	author tls;	state Exp;
branches;
next	;
commitid	8ZVdBEH9XlgKCMLx;

1.2.6.1
date	2014.07.27.14.24.17;	author tls;	state dead;
branches;
next	1.2.6.2;
commitid	jTnpym9Qu0o4R1Nx;

1.2.6.2
date	2014.08.20.00.04.45;	author tls;	state Exp;
branches;
next	;
commitid	jTnpym9Qu0o4R1Nx;


desc
@@


1.3
log
@Allow for testing other than /bin/sh using TEST_SH (from kre@@)
@
text
@# $NetBSD: Makefile,v 1.2 2014/07/27 14:24:17 apb 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>
@


1.2
log
@Run scripts at build time via ${HOST_SH}
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.1 2014/05/31 14:29:06 christos Exp $
d10 4
d26 1
a26 1
	${HOST_SH} ${.CURDIR}/scoped_command '${cmd_scope}' '${cmd}' '${cmd}' \
d38 1
a38 1
	${HOST_SH} ${.CURDIR}/scoped_command '${dot_scope}' \
@


1.2.6.1
log
@file Makefile was added on branch tls-maxphys on 2014-08-20 00:04:45 +0000
@
text
@d1 40
@


1.2.6.2
log
@Rebase to HEAD as of a few days ago.
@
text
@a0 40
# $NetBSD$
#

.include <bsd.own.mk>

TESTSDIR = ${TESTSBASE}/bin/sh/dotcmd

TESTS_SH = t_dotcmd

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
	${HOST_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
	${HOST_SH} ${.CURDIR}/scoped_command '${dot_scope}' \
		'. "${cmd}_${cmd_scope}"' 'dotcmd' 'dotcmd' >'${.TARGET}'
.  endfor
. endfor
.endfor

.include <bsd.test.mk>
@


1.2.2.1
log
@file Makefile was added on branch tls-earlyentropy on 2014-08-10 06:57:02 +0000
@
text
@d1 40
@


1.2.2.2
log
@Rebase.
@
text
@a0 40
# $NetBSD: Makefile,v 1.2 2014/07/27 14:24:17 apb Exp $
#

.include <bsd.own.mk>

TESTSDIR = ${TESTSBASE}/bin/sh/dotcmd

TESTS_SH = t_dotcmd

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
	${HOST_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
	${HOST_SH} ${.CURDIR}/scoped_command '${dot_scope}' \
		'. "${cmd}_${cmd_scope}"' 'dotcmd' 'dotcmd' >'${.TARGET}'
.  endfor
. endfor
.endfor

.include <bsd.test.mk>
@


1.1
log
@PR/48843: Jarmo Jaakkola: Test cses for break/continue/return broken
inside dot commands:

 The test cases are named with the pattern
     dotscope_cmd_cmdscope,
 where dotscope is the scope in which the dot command is and cmdscope
 is the scope where cmd is in the sourced file.
@
text
@d1 1
a1 1
# $NetBSD$
d22 1
a22 1
	${.CURDIR}/scoped_command '${cmd_scope}' '${cmd}' '${cmd}' \
d34 1
a34 1
	${.CURDIR}/scoped_command '${dot_scope}' \
@

