From a499a6bcd7ce064f43eadbd99511b4d5feb8e099 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Mart=C3=AD?= Date: Tue, 23 Feb 2021 17:54:50 +0000 Subject: [PATCH] testdata: simplify goversion test (#232) As per the TODO, just set up the files in the right places. --- testdata/scripts/goversion.txt | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/testdata/scripts/goversion.txt b/testdata/scripts/goversion.txt index f998ecb..d33c0fb 100644 --- a/testdata/scripts/goversion.txt +++ b/testdata/scripts/goversion.txt @@ -1,9 +1,5 @@ -# TODO: Place file direct to .bin directory -mkdir .bin -cp go.sh .bin/go -cp go.bat .bin/go.bat chmod 777 .bin/go -env PATH=.bin${:}${PATH} +env PATH=${WORK}/.bin${:}${PATH} # Check incorrect go install env GO_VERSION='' @@ -45,11 +41,11 @@ env GO_VERSION='go version go1.15.2 windows/amd64' -- main.go -- package main --- go.sh -- +-- .bin/go -- #!/bin/sh [ -z "$GO_VERSION" ] && exit 1 || echo "$GO_VERSION" --- go.bat -- +-- .bin/go.bat -- @echo off IF DEFINED GO_VERSION (echo %GO_VERSION%) ELSE (exit 1)