From 5b387bf6d3a5c2502d86e1ecad0fb7bdc6c427d6 Mon Sep 17 00:00:00 2001 From: Max Okumoto Date: Fri, 25 Feb 2005 08:53:14 +0000 Subject: [PATCH] Add variable expansion regression test. --- .../make/tests/variables/t1/expected.status | 2 + .../make/tests/variables/t1/expected.stderr | 1 + .../make/tests/variables/t1/expected.stdout | 32 ++++++++++++++ usr.bin/make/tests/variables/t1/test.sh | 44 +++++++++++++++++++ 4 files changed, 79 insertions(+) create mode 100644 usr.bin/make/tests/variables/t1/expected.status create mode 100644 usr.bin/make/tests/variables/t1/expected.stderr create mode 100644 usr.bin/make/tests/variables/t1/expected.stdout create mode 100644 usr.bin/make/tests/variables/t1/test.sh diff --git a/usr.bin/make/tests/variables/t1/expected.status b/usr.bin/make/tests/variables/t1/expected.status new file mode 100644 index 0000000000..edd3b890b1 --- /dev/null +++ b/usr.bin/make/tests/variables/t1/expected.status @@ -0,0 +1,2 @@ +$DragonFly: src/usr.bin/make/tests/variables/t1/expected.status,v 1.1 2005/02/25 08:53:14 okumoto Exp $ +0 diff --git a/usr.bin/make/tests/variables/t1/expected.stderr b/usr.bin/make/tests/variables/t1/expected.stderr new file mode 100644 index 0000000000..cbc787f7e4 --- /dev/null +++ b/usr.bin/make/tests/variables/t1/expected.stderr @@ -0,0 +1 @@ +$DragonFly: src/usr.bin/make/tests/variables/t1/expected.stderr,v 1.1 2005/02/25 08:53:14 okumoto Exp $ diff --git a/usr.bin/make/tests/variables/t1/expected.stdout b/usr.bin/make/tests/variables/t1/expected.stdout new file mode 100644 index 0000000000..ba5fd20a54 --- /dev/null +++ b/usr.bin/make/tests/variables/t1/expected.stdout @@ -0,0 +1,32 @@ +$DragonFly: src/usr.bin/make/tests/variables/t1/expected.stdout,v 1.1 2005/02/25 08:53:14 okumoto Exp $ +echo 0 +0 +echo 1 +1 +echo 0 +0 +# The following are soo broken why no syntax error? +echo + +echo + +echo + +echo + +echo + +echo + +echo + +echo + +echo + +echo + +echo + +echo + diff --git a/usr.bin/make/tests/variables/t1/test.sh b/usr.bin/make/tests/variables/t1/test.sh new file mode 100644 index 0000000000..356c0bb796 --- /dev/null +++ b/usr.bin/make/tests/variables/t1/test.sh @@ -0,0 +1,44 @@ +#!/bin/sh + +# $DragonFly: src/usr.bin/make/tests/variables/t1/test.sh,v 1.1 2005/02/25 08:53:14 okumoto Exp $ + +. ../../env.sh + +case $1 in +test) + cat > Makefile << "_EOF_" +A = 0 +AV = 1 +all: + echo $A + echo ${AV} + echo ${A} + # The following are soo broken why no syntax error? + echo $( + echo $) + echo ${ + echo ${A + echo ${A) + echo ${A){ + echo ${AV + echo ${AV) + echo ${AV){ + echo ${AV{ + echo ${A{ + echo $} +_EOF_ + $MAKE 1> stdout 2> stderr + echo $? > status + ;; + +compare) std_compare ;; +diff) std_diff ;; +update) std_update ;; +run) std_run ;; +clean) std_clean ;; + +*) + echo "Usage: $0 run | compare | update | clean" + ;; +esac + -- 2.41.0