mirror of
https://github.com/pyenv/pyenv.git
synced 2025-11-14 06:13:53 -05:00
💅 Clean up version sorting and add test
This commit is contained in:
@@ -119,7 +119,7 @@ path_without() {
|
||||
if [ "$found" != "${RBENV_ROOT}/shims" ]; then
|
||||
alt="${RBENV_TEST_DIR}/$(echo "${found#/}" | tr '/' '-')"
|
||||
mkdir -p "$alt"
|
||||
for util in bash head cut readlink greadlink; do
|
||||
for util in bash head cut readlink greadlink sed sort awk; do
|
||||
if [ -x "${found}/$util" ]; then
|
||||
ln -s "${found}/$util" "${alt}/$util"
|
||||
fi
|
||||
|
||||
@@ -56,15 +56,19 @@ OUT
|
||||
@test "multiple versions" {
|
||||
stub_system_ruby
|
||||
create_version "1.8.7"
|
||||
create_version "1.9.3"
|
||||
create_version "1.9.3-p13"
|
||||
create_version "1.9.3-p2"
|
||||
create_version "2.2.10"
|
||||
create_version "2.2.3"
|
||||
create_version "2.2.3-pre.2"
|
||||
run rbenv-versions
|
||||
assert_success
|
||||
assert_output <<OUT
|
||||
* system
|
||||
1.8.7
|
||||
1.9.3
|
||||
1.9.3-p2
|
||||
1.9.3-p13
|
||||
2.2.3-pre.2
|
||||
2.2.3
|
||||
2.2.10
|
||||
OUT
|
||||
|
||||
Reference in New Issue
Block a user