scc

simple c99 compiler
git clone git://git.simple-cc.org/scc
Log | Files | Refs | Submodules | README | LICENSE

commit 02098888515356ed157ad70eb573ec09fd6110b2
parent 6426c52005d61309b73634bf86fd3bcac624cacc
Author: Roberto E. Vargas Caballero <k0ga@shike2.com>
Date:   Wed, 17 Jan 2024 14:45:49 +0100

tests/make: Split 0010-kflag.sh

It is better to have only one test case per file instead
of sharing the script betwen different test cases.

Diffstat:
Mtests/make/execute/0010-kflag.sh | 13++-----------
Atests/make/execute/0011-kflag.sh | 21+++++++++++++++++++++
2 files changed, 23 insertions(+), 11 deletions(-)

diff --git a/tests/make/execute/0010-kflag.sh b/tests/make/execute/0010-kflag.sh @@ -6,25 +6,16 @@ tmp1=tmp1.$$ tmp2=tmp2.$$ cat <<EOF > $tmp2 +-k sh: 1: no-valid-program: not found make: warning: target error: error 32512 Hello World! make: warning: target follow not remade because of errors no-valid-program -sh: 1: no-valid-program: not found -make: warning: target error: error 32512 -Hello World! -make: warning: target follow not remade because of errors --k -no-valid-program EOF (set -e - scc-make -kf test.mk follow + scc-make -kf test.mk print-makeflags follow echo fail) > $tmp1 2>&1 -(set -e - MAKEFLAGS=-k scc-make -f test.mk follow print-makeflags - echo fail) >> $tmp1 2>&1 - diff $tmp1 $tmp2 diff --git a/tests/make/execute/0011-kflag.sh b/tests/make/execute/0011-kflag.sh @@ -0,0 +1,21 @@ +#!/bin/sh + +trap 'rm -f $tmp1 $tmp2' EXIT INT QUIT HUP TERM + +tmp1=tmp1.$$ +tmp2=tmp2.$$ + +cat <<EOF > $tmp2 +-k +sh: 1: no-valid-program: not found +make: warning: target error: error 32512 +Hello World! +make: warning: target follow not remade because of errors +no-valid-program +EOF + +(set -e + MAKEFLAGS=-k scc-make -f test.mk print-makeflags follow + echo fail) >> $tmp1 2>&1 + +diff $tmp1 $tmp2