Add test for carriage return in ruby-version file

This commit is contained in:
Vincent Robert 2014-03-20 16:27:13 +01:00
parent 2fd3b18d39
commit 3be9773c4f

View file

@ -30,6 +30,13 @@ setup() {
assert_success "1.9.3 (set by ${PWD}/.ruby-version)" 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" { @test "set by global file" {
create_version "1.9.3" create_version "1.9.3"
cat > "${RBENV_ROOT}/version" <<<"1.9.3" cat > "${RBENV_ROOT}/version" <<<"1.9.3"