Move carriage return test to version-file-read

This commit is contained in:
Vincent Robert 2014-03-21 01:32:29 +01:00
parent f50cee2ac7
commit f205ec8359
2 changed files with 6 additions and 7 deletions

View file

@ -64,3 +64,9 @@ IN
run rbenv-version-file-read my-version
assert_success "1.8.7"
}
@test "ignores carriage returns" {
cat > my-version <<< $'1.9.3\r'
run rbenv-version-file-read my-version
assert_success "1.9.3"
}

View file

@ -30,13 +30,6 @@ setup() {
assert_success "1.9.3 (set by ${PWD}/.ruby-version)"
}
@test "set by local file containing CR" {
create_version "1.9.3"
cat > ".ruby-version" <<< $'1.9.3\r'
run rbenv-version
assert_success "1.9.3 (set by ${PWD}/.ruby-version)"
}
@test "set by global file" {
create_version "1.9.3"
cat > "${RBENV_ROOT}/version" <<<"1.9.3"