Module Name:    src
Committed By:   christos
Date:           Fri Feb 19 13:48:28 UTC 2016

Modified Files:
        src/tests/bin/sh: t_expand.sh t_varquote.sh

Log Message:
Add a test for PR/50827


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/tests/bin/sh/t_expand.sh \
    src/tests/bin/sh/t_varquote.sh

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/tests/bin/sh/t_expand.sh
diff -u src/tests/bin/sh/t_expand.sh:1.2 src/tests/bin/sh/t_expand.sh:1.3
--- src/tests/bin/sh/t_expand.sh:1.2	Sun Oct  6 17:05:50 2013
+++ src/tests/bin/sh/t_expand.sh	Fri Feb 19 08:48:28 2016
@@ -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_head() {
 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%%/\**}'
 }
 
Index: src/tests/bin/sh/t_varquote.sh
diff -u src/tests/bin/sh/t_varquote.sh:1.2 src/tests/bin/sh/t_varquote.sh:1.3
--- src/tests/bin/sh/t_varquote.sh:1.2	Sun Mar 25 14:50:19 2012
+++ src/tests/bin/sh/t_varquote.sh	Fri Feb 19 08:48:28 2016
@@ -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 @@ nested_quotes_multiword_body() {
 	    /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
 }

Reply via email to