Add variable expansion regression test.
[dragonfly.git] / usr.bin / make / tests / variables / t1 / test.sh
1 #!/bin/sh
2
3 # $DragonFly: src/usr.bin/make/tests/variables/t1/test.sh,v 1.1 2005/02/25 08:53:14 okumoto Exp $
4
5 . ../../env.sh
6
7 case $1 in
8 test)
9         cat > Makefile << "_EOF_"
10 A       = 0
11 AV      = 1
12 all:
13         echo $A
14         echo ${AV}
15         echo ${A}
16         # The following are soo broken why no syntax error?
17         echo $(
18         echo $)
19         echo ${
20         echo ${A
21         echo ${A)
22         echo ${A){
23         echo ${AV
24         echo ${AV)
25         echo ${AV){
26         echo ${AV{
27         echo ${A{
28         echo $}
29 _EOF_
30         $MAKE 1> stdout 2> stderr
31         echo $? > status
32         ;;
33
34 compare) std_compare ;;
35 diff) std_diff ;;
36 update) std_update ;;
37 run) std_run ;;
38 clean) std_clean ;;
39
40 *)
41         echo "Usage: $0 run | compare | update | clean"
42         ;;
43 esac
44