diff --git a/test/version-file-read.bats b/test/version-file-read.bats index 66bd46fa..bf7bf910 100644 --- a/test/version-file-read.bats +++ b/test/version-file-read.bats @@ -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" +} diff --git a/test/version.bats b/test/version.bats index 1fb97c70..886d0efa 100644 --- a/test/version.bats +++ b/test/version.bats @@ -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"