[Tests] Ensure color codes are stripped in alias tests.

This commit is contained in:
Jordan Harband
2016-04-27 17:05:33 -07:00
parent 9106cc25a4
commit 379d079c30
11 changed files with 111 additions and 97 deletions

View File

@@ -11,3 +11,9 @@ assert_not_ok() {
! $($FUNCTION $@) || die '"'"$FUNCTION $@"'" should have failed, but succeeded'
}
strip_colors() {
while read -r line; do
echo "$line" | LC_ALL=C command sed 's/\[[ -?]*[@-~]//g'
done
}