Commit 928ea046 authored by Leo's avatar Leo

add tests for parameter substitution corner case

parent 8b7970bf
......@@ -825,6 +825,24 @@ is_travis() {
assert_match "${lines[0]}" "\[AL32\].*:.*unnecesary usage of braces"
}
# assert_match "${lines[0]}" "\[AL32\].*:.*unnecesary usage of braces"
@test 'valid variable bracing via parameter substitution' {
cat <<-"EOF" >$apkbuild
pkgname="${pypi_name#py3-}"
EOF
run $cmd $apkbuild
[[ $status -eq 0 ]]
}
@test 'valid local variable bracing via parameter substitution' {
cat <<-"EOF" >$apkbuild
foo() {
local _py3ver pkgname="${pypi_name%%-1}" _test
}
EOF
run $cmd $apkbuild
[[ $status -eq 0 ]]
}
# vim: noexpandtab
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment