mirror of
https://github.com/nvm-sh/nvm.git
synced 2025-10-30 00:45:49 +08:00
[Tests] Ensure color codes are stripped in alias tests.
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user