Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/tests/util/make Add a new test for the latest variable expan...



details:   https://anonhg.NetBSD.org/src/rev/f155f8c59aa8
branches:  trunk
changeset: 759237:f155f8c59aa8
user:      christos <christos%NetBSD.org@localhost>
date:      Fri Dec 03 01:29:55 2010 +0000

description:
Add a new test for the latest variable expansion problem.
- Cannot test because make test prints:
  .: Can't open /usr/share/atf/atf.header.subr
- The shell script common code needs to be fixed to follow regular shell
  style.
  - variables are underquoted
  - uses `` instead of $()
  - does not use local for local variables, prefixes with undescore
  - needlessly uses braces for numeric and symbolic variables.
  - uses a fifo to grab output, and does not clean it up properly on error
  - should not exit with > 127 !!!

diffstat:

 tests/util/make/Makefile               |  4 +++-
 tests/util/make/d_unmatchedvarparen.mk |  3 +++
 tests/util/make/t_make.sh              |  4 +++-
 3 files changed, 9 insertions(+), 2 deletions(-)

diffs (48 lines):

diff -r 5622a44ca3ce -r f155f8c59aa8 tests/util/make/Makefile
--- a/tests/util/make/Makefile  Thu Dec 02 23:12:30 2010 +0000
+++ b/tests/util/make/Makefile  Fri Dec 03 01:29:55 2010 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.2 2010/07/10 16:16:12 jmmv Exp $
+# $NetBSD: Makefile,v 1.3 2010/12/03 01:29:55 christos Exp $
 
 NOMAN=                 # defined
 
@@ -37,6 +37,8 @@
 FILES+=                        d_qequals.out
 FILES+=                        d_ternary.mk
 FILES+=                        d_ternary.out
+FILES+=                        d_unmatchedvarparen.mk
+FILES+=                        d_unmatchedvarparen.out
 FILES+=                        d_varcmd.mk
 FILES+=                        d_varcmd.out
 
diff -r 5622a44ca3ce -r f155f8c59aa8 tests/util/make/d_unmatchedvarparen.mk
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/util/make/d_unmatchedvarparen.mk    Fri Dec 03 01:29:55 2010 +0000
@@ -0,0 +1,3 @@
+
+all:
+       @echo $(foo::=foo-text)
diff -r 5622a44ca3ce -r f155f8c59aa8 tests/util/make/t_make.sh
--- a/tests/util/make/t_make.sh Thu Dec 02 23:12:30 2010 +0000
+++ b/tests/util/make/t_make.sh Fri Dec 03 01:29:55 2010 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: t_make.sh,v 1.2 2010/11/07 17:51:23 jmmv Exp $
+# $NetBSD: t_make.sh,v 1.3 2010/12/03 01:29:55 christos Exp $
 #
 # Copyright (c) 2008, 2010 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -66,6 +66,7 @@
 test_case qequals "Checks operator ?="
 test_case ternary "Checks ternary modifier"
 test_case varcmd "Checks behavior of command line variable assignments"
+test_case unmatchedvarparen "Checks $ ( ) matches"
 
 atf_init_test_cases()
 {
@@ -84,4 +85,5 @@
        atf_add_test_case qequals
        atf_add_test_case ternary
        atf_add_test_case varcmd
+       atf_add_test_case unmathedvarparen
 }



Home | Main Index | Thread Index | Old Index