Skip to content

Commit

Permalink
remove CRs more portably in tests #196
Browse files Browse the repository at this point in the history
Use tr -d '\015' to remove CRs instead of sed 's/\r//', many versions of
sed do not understand \r.
  • Loading branch information
rkitover committed Jun 29, 2016
1 parent 0b5ec7e commit 3f36dc2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion test/vimcat-functions.bats
Expand Up @@ -39,7 +39,7 @@ load helpers

@test "usage prints the help message" {
run usage
[[ "$output" = "$(sed 's/\r//' "$fixtures/vimcat-help.txt")" ]]
[[ "$output" = "$(tr -d '\015' < "$fixtures/vimcat-help.txt")" ]]
status_ok
}

Expand Down
2 changes: 1 addition & 1 deletion test/vimpager-functions.bats
Expand Up @@ -65,7 +65,7 @@ load helpers
@test "usage prints the help message" {
unset -f sed
run usage
[[ "$output" = "$(sed 's/\r//' "$fixtures/vimpager-help.txt")" ]]
[[ "$output" = "$(tr -d '\015' < "$fixtures/vimpager-help.txt")" ]]
status_ok
}
# vim: filetype=sh

0 comments on commit 3f36dc2

Please sign in to comment.