html.mk

static html creation framework using make(1) and cpp(1)
git clone git://0x30.net/html.mk
Log | Files | Refs | README | LICENSE

commit 4095b8c403bd04d2096d412eb6e2dea5aca44321
parent d4152242d3fccda213f8ef149ea3d48bebca781e
Author: Kyle Milz <krwmilz@gmail.com>
Date:   Mon, 22 Nov 2021 16:17:52 +0000

t: add test for empty SRCS array

Diffstat:
At/srcs_empty.t | 20++++++++++++++++++++
1 file changed, 20 insertions(+), 0 deletions(-)

diff --git a/t/srcs_empty.t b/t/srcs_empty.t @@ -0,0 +1,20 @@ +# +# When the SRCS array is empty, html.mk does nothing. +# +use Modern::Perl; +use Test::Cmd; +use Test::More tests => 3; + + +my $cmd = Test::Cmd->new( prog => '/usr/bin/make', workdir => '' ); +my $html_mk = $cmd->here . "/bsd.html.mk"; + +$cmd->write( 'Makefile', <<EOF ); +SRCS= +.include "$html_mk" +EOF + +$cmd->run( chdir => $cmd->curdir ); +is( $cmd->stdout, '', 'make stdout' ); +is( $cmd->stderr, '', 'make stderr' ); +is( $? >> 8, 0, 'make exit status' );