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