From e75cc3a7a2ae2c032b081b9c3ee55f51c7d22b08 Mon Sep 17 00:00:00 2001 From: Victor Borja Date: Sun, 3 Sep 2017 19:53:01 -0500 Subject: [PATCH] Add a test for #224 Allow spaces in .tool_versions file path See #202, #224 --- test/utils.bats | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/test/utils.bats b/test/utils.bats index 15a00af5..c1e2dba9 100644 --- a/test/utils.bats +++ b/test/utils.bats @@ -68,6 +68,16 @@ teardown() { [ "$output" == "0.1.0" ] } +@test "parse_asdf_version_file should output path on project with spaces" { + PROJECT_DIR="$PROJECT_DIR/outer space" + mkdir -p "$PROJECT_DIR" + cd $outer + echo "dummy 0.1.0" > "$PROJECT_DIR/.tool-versions" + run parse_asdf_version_file "$PROJECT_DIR/.tool-versions" dummy + [ "$status" -eq 0 ] + [ "$output" == "0.1.0" ] +} + @test "parse_asdf_version_file should output path version with spaces" { echo "dummy path:/some/dummy path" > $PROJECT_DIR/.tool-versions run parse_asdf_version_file $PROJECT_DIR/.tool-versions dummy