Skip to content

Commit

Permalink
Fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
elijahr committed Nov 5, 2024
1 parent c35b179 commit 6900d5f
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions test/utils.bats
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ load ./lib/test_utils
setup_file() {
PROJECT_DIR="$(realpath "$(dirname "$BATS_TEST_DIRNAME")")"
export PROJECT_DIR
cd "$PROJECT_DIR"
cd "$PROJECT_DIR" || exit
clear_lock git
}

Expand Down Expand Up @@ -130,14 +130,15 @@ teardown() {
assert_line 1.2.8
assert_line 1.4.0
assert_line 1.6.0
assert_line 2.2.0
}

@test "asdf_nim_list_all_versions__displays_in_order" {
assert [ "$(asdf_nim_list_all_versions | grep -Fn '1.6.0' | sed 's/:.*//')" -gt "$(asdf_nim_list_all_versions | grep -Fn '1.4.8' | sed 's/:.*//')" ]
assert [ "$(asdf_nim_list_all_versions | grep -Fn '1.6.2' | sed 's/:.*//')" -gt "$(asdf_nim_list_all_versions | grep -Fn '1.6.0' | sed 's/:.*//')" ]
assert [ "$(asdf_nim_list_all_versions | grep -Fn '1.6.4' | sed 's/:.*//')" -gt "$(asdf_nim_list_all_versions | grep -Fn '1.6.2' | sed 's/:.*//')" ]
assert [ "$(asdf_nim_list_all_versions | grep -Fn '1.6.6' | sed 's/:.*//')" -gt "$(asdf_nim_list_all_versions | grep -Fn '1.6.4' | sed 's/:.*//')" ]
assert [ "$(asdf_nim_list_all_versions | grep -Fn '1.6.8' | sed 's/:.*//')" -gt "$(asdf_nim_list_all_versions | grep -Fn '1.6.6' | sed 's/:.*//')" ]
assert [ "$(asdf_nim_list_all_versions | grep -Fn '1.6.0' | sed 's/:.*//' | head -n1)" -gt "$(asdf_nim_list_all_versions | grep -Fn '1.4.8' | sed 's/:.*//' | head -n1)" ]
assert [ "$(asdf_nim_list_all_versions | grep -Fn '1.6.2' | sed 's/:.*//' | head -n1)" -gt "$(asdf_nim_list_all_versions | grep -Fn '1.6.0' | sed 's/:.*//' | head -n1)" ]
assert [ "$(asdf_nim_list_all_versions | grep -Fn '1.6.4' | sed 's/:.*//' | head -n1)" -gt "$(asdf_nim_list_all_versions | grep -Fn '1.6.2' | sed 's/:.*//' | head -n1)" ]
assert [ "$(asdf_nim_list_all_versions | grep -Fn '1.6.6' | sed 's/:.*//' | head -n1)" -gt "$(asdf_nim_list_all_versions | grep -Fn '1.6.4' | sed 's/:.*//' | head -n1)" ]
assert [ "$(asdf_nim_list_all_versions | grep -Fn '1.6.8' | sed 's/:.*//' | head -n1)" -gt "$(asdf_nim_list_all_versions | grep -Fn '1.6.6' | sed 's/:.*//' | head -n1)" ]
}

@test "asdf_nim_normalize_os" {
Expand Down

0 comments on commit 6900d5f

Please sign in to comment.