From f205ec83592aa5a6f61a720ba5ee5cb950790b97 Mon Sep 17 00:00:00 2001 From: Vincent Robert Date: Fri, 21 Mar 2014 01:32:29 +0100 Subject: [PATCH] Move carriage return test to version-file-read --- test/version-file-read.bats | 6 ++++++ test/version.bats | 7 ------- 2 files changed, 6 insertions(+), 7 deletions(-) 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"