sh: Don't hardcode relative paths in the tests stderr files.
These paths have had to be adjusted to changes in the testsuite runner several times, so modify the tests to remove the need for such adjustment. A cp in functional_test.sh is now unneeded, but this matters little in performance.
This commit is contained in:
@@ -1,2 +1,2 @@
|
||||
# $FreeBSD$
|
||||
${}
|
||||
eval '${}'
|
||||
|
||||
@@ -1 +1 @@
|
||||
./bad-parm-exp2.2: ${}: Bad substitution
|
||||
eval: ${}: Bad substitution
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
# $FreeBSD$
|
||||
${foo/}
|
||||
eval '${foo/}'
|
||||
|
||||
@@ -1 +1 @@
|
||||
./bad-parm-exp3.2: ${foo/}: Bad substitution
|
||||
eval: ${foo/}: Bad substitution
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
# $FreeBSD$
|
||||
${foo:@abc}
|
||||
eval '${foo:@abc}'
|
||||
|
||||
@@ -1 +1 @@
|
||||
./bad-parm-exp4.2: ${foo:@...}: Bad substitution
|
||||
eval: ${foo:@...}: Bad substitution
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
# $FreeBSD$
|
||||
${/}
|
||||
eval '${/}'
|
||||
|
||||
@@ -1 +1 @@
|
||||
./bad-parm-exp5.2: ${/}: Bad substitution
|
||||
eval: ${/}: Bad substitution
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
# $FreeBSD$
|
||||
${#foo^}
|
||||
eval '${#foo^}'
|
||||
|
||||
@@ -1 +1 @@
|
||||
./bad-parm-exp6.2: ${foo...}: Bad substitution
|
||||
eval: ${foo...}: Bad substitution
|
||||
|
||||
@@ -39,13 +39,7 @@ check()
|
||||
local out_file="${SRCDIR}/${tc}.stdout"
|
||||
[ -f "${out_file}" ] && out_flag="-o file:${out_file}"
|
||||
|
||||
# We need to copy the testcase scenario file because some of the
|
||||
# testcases hardcode relative paths in the stderr/stdout.
|
||||
#
|
||||
# TODO: we might be able to generate this path at build time
|
||||
cp ${SRCDIR}/${tc} .
|
||||
|
||||
atf_check -s exit:${tc##*.} ${err_flag} ${out_flag} ${SH} "./${tc}"
|
||||
atf_check -s exit:${tc##*.} ${err_flag} ${out_flag} ${SH} "${SRCDIR}/${tc}"
|
||||
}
|
||||
|
||||
add_testcase()
|
||||
|
||||
Reference in New Issue
Block a user