~sircmpwn/ctools

b2368727537ffebffe81e3d74031871e1cc1db98 — Chris Vittal 11 months ago 3eec5b9
tests: make echo tests robust to build directory
1 files changed, 4 insertions(+), 4 deletions(-)

M test/echo
M test/echo => test/echo +4 -4
@@ 3,22 3,22 @@ tool="echo"
. "$HARNESS"

should_handle_one_string() (
	ct="$(../build/echo "this is a test string")"
	ct="$(./echo "this is a test string")"
	[ "$ct" = "this is a test string" ]
)

should_handle_two_string() (
	ct="$(../build/echo "this is a test string" "this second string")"
	ct="$(./echo "this is a test string" "this second string")"
	[ "$ct" = "this is a test string this second string" ]
)

should_handle_tab_char() (
	ct="$(../build/echo -n "\tthis is a test string")"
	ct="$(./echo -n "\tthis is a test string")"
	[ "$ct" = '	this is a test string' ]
)

should_handle_c_escape_char() (
	ct="$(../build/echo -n "this is a \ctest string")"
	ct="$(./echo -n "this is a \ctest string")"
	[ "$ct" = "this is a " ]
)