diff --git a/NEWS b/NEWS index da0cd812..83b94259 100644 --- a/NEWS +++ b/NEWS @@ -34,6 +34,9 @@ STILL UNDER DEVELOPMENT; NOT RELEASED YET. * Issue #15: Fix atf_utils_{fork,wait} to support nested calls. +* Issue #16: Fixed test failures (by removing a long-standing hack) on + systems that lack \e support in printf(1). + * Issue #19: Removed stale references to atf-config and atf-run. diff --git a/atf-sh/atf-check_test.sh b/atf-sh/atf-check_test.sh index 7319a2b8..d66d12e4 100644 --- a/atf-sh/atf-check_test.sh +++ b/atf-sh/atf-check_test.sh @@ -211,16 +211,7 @@ oflag_inline_body() h_pass "echo foo bar" -o inline:"foo bar\n" h_pass "printf 'foo bar'" -o inline:"foo bar" h_pass "printf '\t\n\t\n'" -o inline:"\t\n\t\n" - # XXX Ugly hack to workaround the lack of \e in FreeBSD. Also, \e doesn't - # seem to work as expected in Linux. Look for a nicer solution. - case $(uname) in - Darwin|FreeBSD|Linux) - h_pass "printf '\a\b\f\n\r\t\v'" -o inline:"\a\b\f\n\r\t\v" - ;; - *) - h_pass "printf '\a\b\e\f\n\r\t\v'" -o inline:"\a\b\e\f\n\r\t\v" - ;; - esac + h_pass "printf '\a\b\033\f\n\r\t\v'" -o inline:"\a\b\e\f\n\r\t\v" h_pass "printf '\011\022\033\012'" -o inline:"\011\022\033\012" h_fail "echo foo bar" -o inline:"foo bar" @@ -331,16 +322,7 @@ eflag_inline_body() h_pass "echo foo bar 1>&2" -e inline:"foo bar\n" h_pass "printf 'foo bar' 1>&2" -e inline:"foo bar" h_pass "printf '\t\n\t\n' 1>&2" -e inline:"\t\n\t\n" - # XXX Ugly hack to workaround the lack of \e in FreeBSD. Also, \e doesn't - # seem to work as expected in Linux. Look for a nicer solution. - case $(uname) in - Darwin|FreeBSD|Linux) - h_pass "printf '\a\b\f\n\r\t\v' 1>&2" -e inline:"\a\b\f\n\r\t\v" - ;; - *) - h_pass "printf '\a\b\e\f\n\r\t\v' 1>&2" -e inline:"\a\b\e\f\n\r\t\v" - ;; - esac + h_pass "printf '\a\b\033\f\n\r\t\v' 1>&2" -e inline:"\a\b\e\f\n\r\t\v" h_pass "printf '\011\022\033\012' 1>&2" -e inline:"\011\022\033\012" h_fail "echo foo bar 1>&2" -e inline:"foo bar"