Source-Changes-HG archive

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

[src/trunk]: src/tests/bin/sh Add a test for PR/50827



details:   https://anonhg.NetBSD.org/src/rev/c00017c7b134
branches:  trunk
changeset: 813796:c00017c7b134
user:      christos <christos%NetBSD.org@localhost>
date:      Fri Feb 19 13:48:28 2016 +0000

description:
Add a test for PR/50827

diffstat:

 tests/bin/sh/t_expand.sh   |   4 ++--
 tests/bin/sh/t_varquote.sh |  13 ++++++++++++-
 2 files changed, 14 insertions(+), 3 deletions(-)

diffs (46 lines):

diff -r 426882fb612c -r c00017c7b134 tests/bin/sh/t_expand.sh
--- a/tests/bin/sh/t_expand.sh  Fri Feb 19 06:19:06 2016 +0000
+++ b/tests/bin/sh/t_expand.sh  Fri Feb 19 13:48:28 2016 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: t_expand.sh,v 1.2 2013/10/06 21:05:50 ast Exp $
+# $NetBSD: t_expand.sh,v 1.3 2016/02/19 13:48:28 christos Exp $
 #
 # Copyright (c) 2007, 2009 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -91,7 +91,7 @@
 strip_body() {
        line='#define bindir "/usr/bin" /* comment */'
        stripped='#define bindir "/usr/bin" '
-       atf_expect_fail "PR bin/43469"
+#      atf_expect_fail "PR bin/43469"
        atf_check_equal '$stripped' '${line%%/\**}'
 }
 
diff -r 426882fb612c -r c00017c7b134 tests/bin/sh/t_varquote.sh
--- a/tests/bin/sh/t_varquote.sh        Fri Feb 19 06:19:06 2016 +0000
+++ b/tests/bin/sh/t_varquote.sh        Fri Feb 19 13:48:28 2016 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: t_varquote.sh,v 1.2 2012/03/25 18:50:19 christos Exp $
+# $NetBSD: t_varquote.sh,v 1.3 2016/02/19 13:48:28 christos Exp $
 #
 # Copyright (c) 2007 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -75,7 +75,18 @@
            /bin/sh -c 'echo "${foo:="first-word"} second-word"'
 }
 
+atf_test_case default_assignment_with_arith
+default_assignment_with_arith_head() {
+       atf_set "descr" "Tests default variable assignment with arithmetic" \
+           "string works (PR bin/50827)"
+}
+default_assignment_with_arith_body() {
+       atf_check -s eq:0 -o empty -e empty /bin/sh -c ': "${x=$((1))}"'
+
+}
+
 atf_init_test_cases() {
        atf_add_test_case all
        atf_add_test_case nested_quotes_multiword
+       atf_add_test_case default_assignment_with_arith
 }



Home | Main Index | Thread Index | Old Index