Add a test for PR/50827

This commit is contained in:
christos 2016-02-19 13:48:28 +00:00
parent dcbb4e91e7
commit 64d8e9d299
2 changed files with 14 additions and 3 deletions

View File

@ -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%%/\**}'
}

View File

@ -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
}