Skip to content

Commit

Permalink
fixe colour for --FAIL
Browse files Browse the repository at this point in the history
  • Loading branch information
Marcel Huijkman committed Oct 28, 2022
1 parent 0c3c8fb commit 4076013
Show file tree
Hide file tree
Showing 14 changed files with 37 additions and 29 deletions.
2 changes: 1 addition & 1 deletion dist/artifacts.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
[{"name":"gotest","path":"/Users/marcelhuijkman/data/Go/go-private/gotest/dist/gotest_darwin_arm64/gotest","goos":"darwin","goarch":"arm64","internal_type":4,"type":"Binary","extra":{"Binary":"gotest","Ext":"","ID":"gotest"}},{"name":"gotest","path":"/Users/marcelhuijkman/data/Go/go-private/gotest/dist/gotest_linux_arm64/gotest","goos":"linux","goarch":"arm64","internal_type":4,"type":"Binary","extra":{"Binary":"gotest","Ext":"","ID":"gotest"}},{"name":"gotest","path":"/Users/marcelhuijkman/data/Go/go-private/gotest/dist/gotest_linux_386/gotest","goos":"linux","goarch":"386","internal_type":4,"type":"Binary","extra":{"Binary":"gotest","Ext":"","ID":"gotest"}},{"name":"gotest.exe","path":"/Users/marcelhuijkman/data/Go/go-private/gotest/dist/gotest_windows_arm64/gotest.exe","goos":"windows","goarch":"arm64","internal_type":4,"type":"Binary","extra":{"Binary":"gotest","Ext":".exe","ID":"gotest"}},{"name":"gotest","path":"/Users/marcelhuijkman/data/Go/go-private/gotest/dist/gotest_linux_amd64_v1/gotest","goos":"linux","goarch":"amd64","goamd64":"v1","internal_type":4,"type":"Binary","extra":{"Binary":"gotest","Ext":"","ID":"gotest"}},{"name":"gotest","path":"/Users/marcelhuijkman/data/Go/go-private/gotest/dist/gotest_darwin_amd64_v1/gotest","goos":"darwin","goarch":"amd64","goamd64":"v1","internal_type":4,"type":"Binary","extra":{"Binary":"gotest","Ext":"","ID":"gotest"}},{"name":"gotest.exe","path":"/Users/marcelhuijkman/data/Go/go-private/gotest/dist/gotest_windows_386/gotest.exe","goos":"windows","goarch":"386","internal_type":4,"type":"Binary","extra":{"Binary":"gotest","Ext":".exe","ID":"gotest"}},{"name":"gotest.exe","path":"/Users/marcelhuijkman/data/Go/go-private/gotest/dist/gotest_windows_amd64_v1/gotest.exe","goos":"windows","goarch":"amd64","goamd64":"v1","internal_type":4,"type":"Binary","extra":{"Binary":"gotest","Ext":".exe","ID":"gotest"}},{"name":"gotest_v1.19.13_Linux_i386.tar.gz","path":"dist/gotest_v1.19.13_Linux_i386.tar.gz","goos":"linux","goarch":"386","internal_type":1,"type":"Archive","extra":{"Binaries":["gotest"],"Builds":[{"name":"gotest","path":"/Users/marcelhuijkman/data/Go/go-private/gotest/dist/gotest_linux_386/gotest","goos":"linux","goarch":"386","internal_type":4,"type":"Binary","extra":{"Binary":"gotest","Ext":"","ID":"gotest"}}],"Format":"tar.gz","ID":"default","Replaces":null,"WrappedIn":""}},{"name":"gotest_v1.19.13_Windows_i386.tar.gz","path":"dist/gotest_v1.19.13_Windows_i386.tar.gz","goos":"windows","goarch":"386","internal_type":1,"type":"Archive","extra":{"Binaries":["gotest.exe"],"Builds":[{"name":"gotest.exe","path":"/Users/marcelhuijkman/data/Go/go-private/gotest/dist/gotest_windows_386/gotest.exe","goos":"windows","goarch":"386","internal_type":4,"type":"Binary","extra":{"Binary":"gotest","Ext":".exe","ID":"gotest"}}],"Format":"tar.gz","ID":"default","Replaces":null,"WrappedIn":""}},{"name":"gotest_v1.19.13_Windows_arm64.tar.gz","path":"dist/gotest_v1.19.13_Windows_arm64.tar.gz","goos":"windows","goarch":"arm64","internal_type":1,"type":"Archive","extra":{"Binaries":["gotest.exe"],"Builds":[{"name":"gotest.exe","path":"/Users/marcelhuijkman/data/Go/go-private/gotest/dist/gotest_windows_arm64/gotest.exe","goos":"windows","goarch":"arm64","internal_type":4,"type":"Binary","extra":{"Binary":"gotest","Ext":".exe","ID":"gotest"}}],"Format":"tar.gz","ID":"default","Replaces":null,"WrappedIn":""}},{"name":"gotest_v1.19.13_Linux_arm64.tar.gz","path":"dist/gotest_v1.19.13_Linux_arm64.tar.gz","goos":"linux","goarch":"arm64","internal_type":1,"type":"Archive","extra":{"Binaries":["gotest"],"Builds":[{"name":"gotest","path":"/Users/marcelhuijkman/data/Go/go-private/gotest/dist/gotest_linux_arm64/gotest","goos":"linux","goarch":"arm64","internal_type":4,"type":"Binary","extra":{"Binary":"gotest","Ext":"","ID":"gotest"}}],"Format":"tar.gz","ID":"default","Replaces":null,"WrappedIn":""}},{"name":"gotest_v1.19.13_Darwin_arm64.tar.gz","path":"dist/gotest_v1.19.13_Darwin_arm64.tar.gz","goos":"darwin","goarch":"arm64","internal_type":1,"type":"Archive","extra":{"Binaries":["gotest"],"Builds":[{"name":"gotest","path":"/Users/marcelhuijkman/data/Go/go-private/gotest/dist/gotest_darwin_arm64/gotest","goos":"darwin","goarch":"arm64","internal_type":4,"type":"Binary","extra":{"Binary":"gotest","Ext":"","ID":"gotest"}}],"Format":"tar.gz","ID":"default","Replaces":null,"WrappedIn":""}},{"name":"gotest_v1.19.13_Linux_x86_64.tar.gz","path":"dist/gotest_v1.19.13_Linux_x86_64.tar.gz","goos":"linux","goarch":"amd64","goamd64":"v1","internal_type":1,"type":"Archive","extra":{"Binaries":["gotest"],"Builds":[{"name":"gotest","path":"/Users/marcelhuijkman/data/Go/go-private/gotest/dist/gotest_linux_amd64_v1/gotest","goos":"linux","goarch":"amd64","goamd64":"v1","internal_type":4,"type":"Binary","extra":{"Binary":"gotest","Ext":"","ID":"gotest"}}],"Format":"tar.gz","ID":"default","Replaces":null,"WrappedIn":""}},{"name":"gotest_v1.19.13_Darwin_x86_64.tar.gz","path":"dist/gotest_v1.19.13_Darwin_x86_64.tar.gz","goos":"darwin","goarch":"amd64","goamd64":"v1","internal_type":1,"type":"Archive","extra":{"Binaries":["gotest"],"Builds":[{"name":"gotest","path":"/Users/marcelhuijkman/data/Go/go-private/gotest/dist/gotest_darwin_amd64_v1/gotest","goos":"darwin","goarch":"amd64","goamd64":"v1","internal_type":4,"type":"Binary","extra":{"Binary":"gotest","Ext":"","ID":"gotest"}}],"Format":"tar.gz","ID":"default","Replaces":null,"WrappedIn":""}},{"name":"gotest_v1.19.13_Windows_x86_64.tar.gz","path":"dist/gotest_v1.19.13_Windows_x86_64.tar.gz","goos":"windows","goarch":"amd64","goamd64":"v1","internal_type":1,"type":"Archive","extra":{"Binaries":["gotest.exe"],"Builds":[{"name":"gotest.exe","path":"/Users/marcelhuijkman/data/Go/go-private/gotest/dist/gotest_windows_amd64_v1/gotest.exe","goos":"windows","goarch":"amd64","goamd64":"v1","internal_type":4,"type":"Binary","extra":{"Binary":"gotest","Ext":".exe","ID":"gotest"}}],"Format":"tar.gz","ID":"default","Replaces":null,"WrappedIn":""}},{"name":"checksums.txt","path":"dist/checksums.txt","internal_type":12,"type":"Checksum","extra":{}}]
[{"name":"gotest","path":"/Users/marcelhuijkman/data/Go/go-private/gotest/dist/gotest_darwin_arm64/gotest","goos":"darwin","goarch":"arm64","internal_type":4,"type":"Binary","extra":{"Binary":"gotest","Ext":"","ID":"gotest"}},{"name":"gotest","path":"/Users/marcelhuijkman/data/Go/go-private/gotest/dist/gotest_linux_386/gotest","goos":"linux","goarch":"386","internal_type":4,"type":"Binary","extra":{"Binary":"gotest","Ext":"","ID":"gotest"}},{"name":"gotest","path":"/Users/marcelhuijkman/data/Go/go-private/gotest/dist/gotest_darwin_amd64_v1/gotest","goos":"darwin","goarch":"amd64","goamd64":"v1","internal_type":4,"type":"Binary","extra":{"Binary":"gotest","Ext":"","ID":"gotest"}},{"name":"gotest","path":"/Users/marcelhuijkman/data/Go/go-private/gotest/dist/gotest_linux_amd64_v1/gotest","goos":"linux","goarch":"amd64","goamd64":"v1","internal_type":4,"type":"Binary","extra":{"Binary":"gotest","Ext":"","ID":"gotest"}},{"name":"gotest","path":"/Users/marcelhuijkman/data/Go/go-private/gotest/dist/gotest_linux_arm64/gotest","goos":"linux","goarch":"arm64","internal_type":4,"type":"Binary","extra":{"Binary":"gotest","Ext":"","ID":"gotest"}},{"name":"gotest.exe","path":"/Users/marcelhuijkman/data/Go/go-private/gotest/dist/gotest_windows_arm64/gotest.exe","goos":"windows","goarch":"arm64","internal_type":4,"type":"Binary","extra":{"Binary":"gotest","Ext":".exe","ID":"gotest"}},{"name":"gotest.exe","path":"/Users/marcelhuijkman/data/Go/go-private/gotest/dist/gotest_windows_386/gotest.exe","goos":"windows","goarch":"386","internal_type":4,"type":"Binary","extra":{"Binary":"gotest","Ext":".exe","ID":"gotest"}},{"name":"gotest.exe","path":"/Users/marcelhuijkman/data/Go/go-private/gotest/dist/gotest_windows_amd64_v1/gotest.exe","goos":"windows","goarch":"amd64","goamd64":"v1","internal_type":4,"type":"Binary","extra":{"Binary":"gotest","Ext":".exe","ID":"gotest"}},{"name":"gotest_v1.19.14_Linux_i386.tar.gz","path":"dist/gotest_v1.19.14_Linux_i386.tar.gz","goos":"linux","goarch":"386","internal_type":1,"type":"Archive","extra":{"Binaries":["gotest"],"Builds":[{"name":"gotest","path":"/Users/marcelhuijkman/data/Go/go-private/gotest/dist/gotest_linux_386/gotest","goos":"linux","goarch":"386","internal_type":4,"type":"Binary","extra":{"Binary":"gotest","Ext":"","ID":"gotest"}}],"Format":"tar.gz","ID":"default","Replaces":null,"WrappedIn":""}},{"name":"gotest_v1.19.14_Windows_arm64.tar.gz","path":"dist/gotest_v1.19.14_Windows_arm64.tar.gz","goos":"windows","goarch":"arm64","internal_type":1,"type":"Archive","extra":{"Binaries":["gotest.exe"],"Builds":[{"name":"gotest.exe","path":"/Users/marcelhuijkman/data/Go/go-private/gotest/dist/gotest_windows_arm64/gotest.exe","goos":"windows","goarch":"arm64","internal_type":4,"type":"Binary","extra":{"Binary":"gotest","Ext":".exe","ID":"gotest"}}],"Format":"tar.gz","ID":"default","Replaces":null,"WrappedIn":""}},{"name":"gotest_v1.19.14_Darwin_arm64.tar.gz","path":"dist/gotest_v1.19.14_Darwin_arm64.tar.gz","goos":"darwin","goarch":"arm64","internal_type":1,"type":"Archive","extra":{"Binaries":["gotest"],"Builds":[{"name":"gotest","path":"/Users/marcelhuijkman/data/Go/go-private/gotest/dist/gotest_darwin_arm64/gotest","goos":"darwin","goarch":"arm64","internal_type":4,"type":"Binary","extra":{"Binary":"gotest","Ext":"","ID":"gotest"}}],"Format":"tar.gz","ID":"default","Replaces":null,"WrappedIn":""}},{"name":"gotest_v1.19.14_Linux_arm64.tar.gz","path":"dist/gotest_v1.19.14_Linux_arm64.tar.gz","goos":"linux","goarch":"arm64","internal_type":1,"type":"Archive","extra":{"Binaries":["gotest"],"Builds":[{"name":"gotest","path":"/Users/marcelhuijkman/data/Go/go-private/gotest/dist/gotest_linux_arm64/gotest","goos":"linux","goarch":"arm64","internal_type":4,"type":"Binary","extra":{"Binary":"gotest","Ext":"","ID":"gotest"}}],"Format":"tar.gz","ID":"default","Replaces":null,"WrappedIn":""}},{"name":"gotest_v1.19.14_Linux_x86_64.tar.gz","path":"dist/gotest_v1.19.14_Linux_x86_64.tar.gz","goos":"linux","goarch":"amd64","goamd64":"v1","internal_type":1,"type":"Archive","extra":{"Binaries":["gotest"],"Builds":[{"name":"gotest","path":"/Users/marcelhuijkman/data/Go/go-private/gotest/dist/gotest_linux_amd64_v1/gotest","goos":"linux","goarch":"amd64","goamd64":"v1","internal_type":4,"type":"Binary","extra":{"Binary":"gotest","Ext":"","ID":"gotest"}}],"Format":"tar.gz","ID":"default","Replaces":null,"WrappedIn":""}},{"name":"gotest_v1.19.14_Darwin_x86_64.tar.gz","path":"dist/gotest_v1.19.14_Darwin_x86_64.tar.gz","goos":"darwin","goarch":"amd64","goamd64":"v1","internal_type":1,"type":"Archive","extra":{"Binaries":["gotest"],"Builds":[{"name":"gotest","path":"/Users/marcelhuijkman/data/Go/go-private/gotest/dist/gotest_darwin_amd64_v1/gotest","goos":"darwin","goarch":"amd64","goamd64":"v1","internal_type":4,"type":"Binary","extra":{"Binary":"gotest","Ext":"","ID":"gotest"}}],"Format":"tar.gz","ID":"default","Replaces":null,"WrappedIn":""}},{"name":"gotest_v1.19.14_Windows_x86_64.tar.gz","path":"dist/gotest_v1.19.14_Windows_x86_64.tar.gz","goos":"windows","goarch":"amd64","goamd64":"v1","internal_type":1,"type":"Archive","extra":{"Binaries":["gotest.exe"],"Builds":[{"name":"gotest.exe","path":"/Users/marcelhuijkman/data/Go/go-private/gotest/dist/gotest_windows_amd64_v1/gotest.exe","goos":"windows","goarch":"amd64","goamd64":"v1","internal_type":4,"type":"Binary","extra":{"Binary":"gotest","Ext":".exe","ID":"gotest"}}],"Format":"tar.gz","ID":"default","Replaces":null,"WrappedIn":""}},{"name":"gotest_v1.19.14_Windows_i386.tar.gz","path":"dist/gotest_v1.19.14_Windows_i386.tar.gz","goos":"windows","goarch":"386","internal_type":1,"type":"Archive","extra":{"Binaries":["gotest.exe"],"Builds":[{"name":"gotest.exe","path":"/Users/marcelhuijkman/data/Go/go-private/gotest/dist/gotest_windows_386/gotest.exe","goos":"windows","goarch":"386","internal_type":4,"type":"Binary","extra":{"Binary":"gotest","Ext":".exe","ID":"gotest"}}],"Format":"tar.gz","ID":"default","Replaces":null,"WrappedIn":""}},{"name":"checksums.txt","path":"dist/checksums.txt","internal_type":12,"type":"Checksum","extra":{}}]
16 changes: 8 additions & 8 deletions dist/checksums.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
17b50cbe2b86521db2d706762bc4b293ef3e2f1c60000f271af3b9294de39e33 gotest_v1.19.13_Linux_x86_64.tar.gz
3002ed8eaf371c550878c6e557cc3d96bfe0142da92cea9eb80c56bcd1312de2 gotest_v1.19.13_Darwin_arm64.tar.gz
32859c46c30cfc40333b0be73c2bf2ab659f944895ae7c95d95d2217af616c72 gotest_v1.19.13_Windows_x86_64.tar.gz
5385ce34b16126fa14a297b748d1fe78f71175b38930d212e203389ae4b8b583 gotest_v1.19.13_Windows_arm64.tar.gz
a2993451e0cb0c330d553f27b1a76396a69e6f58c8560fca2bf479ef0e38d1b1 gotest_v1.19.13_Windows_i386.tar.gz
d122ddd2cb46f3b503bdab8cd5cd0b965970b576c8c89e113bc52389bbef9690 gotest_v1.19.13_Linux_i386.tar.gz
d45163e02185e669353e417b2694ff2802a5d52ff619cd8da43dd7e18bfd0aef gotest_v1.19.13_Linux_arm64.tar.gz
d8da7d88704471fb242c3a0ea73576eabdb568191e60ed9e6e25ff41a6bf1eec gotest_v1.19.13_Darwin_x86_64.tar.gz
1d6dedd3622b8f756037a7fa103038a00bd1ce2020cd41451bb140444fd34d95 gotest_v1.19.14_Windows_arm64.tar.gz
3933429c6684e3724f424b097a5283a07056553c0e011c088be7b1a8f41a3c37 gotest_v1.19.14_Linux_arm64.tar.gz
64dffdd3ebf458db46913d9d8b66411a13a8586f491eb39529c914624b5066ec gotest_v1.19.14_Linux_x86_64.tar.gz
70fefd03cfc6dce05f7b70b3c2ef154eb1a94ddcc42dd2737acb510274a6a614 gotest_v1.19.14_Darwin_arm64.tar.gz
8862a3da478400a6d96afa34b23bef6fa827acf5134e3cb85fe7da6722aa689e gotest_v1.19.14_Linux_i386.tar.gz
93d818291e8c7d3c30411cf18ffafa4b5879e3e4851f2a3869fc14592908a9b1 gotest_v1.19.14_Darwin_x86_64.tar.gz
a9e901e14f453cb6bfa25c245f0430dda50bca2eb557f57759fd4453c61f0df2 gotest_v1.19.14_Windows_x86_64.tar.gz
b16b2ad61b68fae0629fe013f5cb0fc3f571d4053cd2c952b135a6bad2938f97 gotest_v1.19.14_Windows_i386.tar.gz
Binary file added dist/gotest_v1.19.14_Darwin_arm64.tar.gz
Binary file not shown.
Binary file added dist/gotest_v1.19.14_Darwin_x86_64.tar.gz
Binary file not shown.
Binary file added dist/gotest_v1.19.14_Linux_arm64.tar.gz
Binary file not shown.
Binary file added dist/gotest_v1.19.14_Linux_i386.tar.gz
Binary file not shown.
Binary file added dist/gotest_v1.19.14_Linux_x86_64.tar.gz
Binary file not shown.
Binary file added dist/gotest_v1.19.14_Windows_arm64.tar.gz
Binary file not shown.
Binary file added dist/gotest_v1.19.14_Windows_i386.tar.gz
Binary file not shown.
Binary file added dist/gotest_v1.19.14_Windows_x86_64.tar.gz
Binary file not shown.
2 changes: 1 addition & 1 deletion dist/metadata.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"project_name":"gotest","tag":"v1.19.12","previous_tag":"v1.19.11","version":"v1.19.13","commit":"40f6713cbdd635c68ee27a0f941771243148239f","date":"2022-10-27T11:02:09.934281+02:00","runtime":{"goos":"darwin","goarch":"arm64"}}
{"project_name":"gotest","tag":"v1.19.13","previous_tag":"v1.19.12","version":"v1.19.14","commit":"bf6b292ae95f36888f5a706bf879301166088d54","date":"2022-10-28T10:38:08.113808+02:00","runtime":{"goos":"darwin","goarch":"arm64"}}
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/marcelloh/gotest

go 1.17
go 1.19

require (
github.com/enescakir/emoji v1.0.0
Expand Down
9 changes: 0 additions & 9 deletions go.sum
Original file line number Diff line number Diff line change
@@ -1,17 +1,8 @@
github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/enescakir/emoji v1.0.0 h1:W+HsNql8swfCQFtioDGDHCHri8nudlK1n5p2rHCJoog=
github.com/enescakir/emoji v1.0.0/go.mod h1:Bt1EKuLnKDTYpLALApstIkAjdDrS/8IAgTkKp+WKFD0=
github.com/iskaa02/qalam v0.3.0 h1:yA7+MXkXbkP0HRDpkODC3bgQG0e5mjsYOsawwYP2v5k=
github.com/iskaa02/qalam v0.3.0/go.mod h1:BRa4ht8cMjl27tNzhtuach90dBTma5seOzjpMGA5MY4=
github.com/lucasb-eyer/go-colorful v1.0.3/go.mod h1:R4dSotOR9KMtayYi1e77YzuveK+i7ruzyGqttikkLy0=
github.com/mazznoer/colorgrad v0.8.1/go.mod h1:xCjvoNkXHJIAPOUMSMrXkFdxTGQqk8zMYS3e5hSLghA=
github.com/mazznoer/csscolorparser v0.1.0/go.mod h1:Aj22+L/rYN/Y6bj3bYqO3N6g1dtdHtGfQ32xZ5PJQic=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY=
github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo=
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
35 changes: 26 additions & 9 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,20 +79,35 @@ func main() {
}
}

cd := ""
if strings.Contains(args[1], "-cd ") {
parts := strings.Split(args[1], "-cd ")
cd = parts[1]
err := os.Chdir(cd)
if err != nil {
log.Print(err)
}

copy(args[1:], args[2:]) // Shift a[i+1:] left one index.
args[len(args)-1] = "" // Erase last element (write zero value).
args = args[:len(args)-1]
println("CD to ", cd)
}

rootDir, _ = os.Getwd()

os.Exit(run())
os.Exit(run(lastArg))
}

/*
run starts to test all files.
*/
func run() int {
func run(lastArg string) int {
startTime = time.Now().Local()

bbcode.Printf("[white]%s[/white]", "gotest v1.19.13")
bbcode.Printf("[white]%s[/white]", "gotest v1.19.14")
println()
findTestFiles()
findTestFiles(lastArg)

exitCode := gotest(args[1:])

Expand Down Expand Up @@ -286,8 +301,9 @@ func statusAddFail(colour, trimmed string) string {
return colour
}

func statusFail(colour, trimmedIn, lineIn string, isNextFileIn bool) (errColour, trimmed, line string, isNextFile bool) {
if strings.HasPrefix(trimmed, "FAIL") {
func statusFail(colourIn, trimmedIn, lineIn string, isNextFileIn bool) (colour, trimmed, line string, isNextFile bool) {
colour = colourIn
if strings.HasPrefix(trimmedIn, "FAIL") {
colour = errColour
}

Expand All @@ -306,8 +322,9 @@ func statusFail(colour, trimmedIn, lineIn string, isNextFileIn bool) (errColour,
isNextFile = true
fileLine = lastLine
lastFunc = getFuncName(trimmed)
colour = errColour

return errColour, trimmed, line, isNextFile
return colour, trimmed, line, isNextFile
}

func statusUnknown(colour, trimmed string) string {
Expand Down Expand Up @@ -434,8 +451,8 @@ func showFileLink(line string) {
/*
findTestFiles finds all testfiles.
*/
func findTestFiles() {
dir, err := filepath.Abs(filepath.Dir("."))
func findTestFiles(lastArg string) {
dir, err := filepath.Abs(filepath.Dir(lastArg))
if err != nil {
log.Fatal(err)
}
Expand Down

0 comments on commit 4076013

Please sign in to comment.