tests/make: Fix mistakes after trap changes - scc - simple c99 compiler
HTML git clone git://git.simple-cc.org/scc
DIR Log
DIR Files
DIR Refs
DIR Submodules
DIR README
DIR LICENSE
---
DIR commit 0dc121edaac1b54277f2eac7c3fac45746326ff2
DIR parent 5eedaa9f030481f63ab828c89c0623068fd2b7a7
HTML Author: Roberto E. Vargas Caballero <k0ga@shike2.net>
Date: Wed, 11 Feb 2026 14:44:44 +0100
tests/make: Fix mistakes after trap changes
Diffstat:
M tests/make/execute/0039-rules.sh | 3 ++-
M tests/make/execute/0094-expansion.… | 29 ++++++++++++++++-------------
2 files changed, 18 insertions(+), 14 deletions(-)
---
DIR diff --git a/tests/make/execute/0039-rules.sh b/tests/make/execute/0039-rules.sh
@@ -1,9 +1,10 @@
#!/bin/sh
-trap 'rm -f $tmp1 file?' EXIT
+trap 'rm -f $tmp1 $tmp2 file?' EXIT
trap 'exit $?' HUP INT TERM
tmp1=tmp1.$$
+tmp2=tmp2.$$
touch $tmp2
DIR diff --git a/tests/make/execute/0094-expansion.sh b/tests/make/execute/0094-expansion.sh
@@ -1,11 +1,24 @@
#!/bin/sh
-trap 'rm -f $tmp1' EXIT
+trap 'rm -f $tmp1 $tmp2' EXIT
trap 'exit $?' HUP INT TERM
tmp1=tmp1.$$
+tmp2=tmp2.$$
-$EXEC scc make -f- <<'EOF' > $tmp1 2>&1
+cat > $tmp1 <<EOF
+file1.o file2.o
+all
+alp
+all.o
+file1.c file2.c
+file1 file2
+file1.e file2.e
+file1.c file2.c
+all
+EOF
+
+$EXEC scc make -f- <<'EOF' > $tmp2 2>&1
O = o
SRC = file1.c file2.c
OBJ = $(SRC:.c=.$O)
@@ -44,14 +57,4 @@ all:
@echo ${@:=}
EOF
-diff $tmp1 - <<EOF
-file1.o file2.o
-all
-alp
-all.o
-file1.c file2.c
-file1 file2
-file1.e file2.e
-file1.c file2.c
-all
-EOF
+diff $tmp1 $tmp2