Last active
January 24, 2019 17:01
-
-
Save dev-rice/382ca7d9555b99b536c0738ea7bfce03 to your computer and use it in GitHub Desktop.
Run go tests automatically (now with COLOR!)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# TODO make the sed to color 'ok' only color 'ok ' | |
go test ./... $@ | sed ''/PASS/s//$(printf "\033[32mPASS\033[0m")/'' | sed ''/FAIL/s//$(printf "\033[31mFAIL\033[0m")/'' | sed ''/ok/s//$(printf "\033[32mok\033[0m")/'' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
cmd='echo "$(printf "\033[34m===== RUNNING TESTS =====\033[0m")" && go_test_color -cover; echo' | |
eval $cmd | |
reflex -r '\.go$' -- sh -c "eval $cmd" | sed "s/^\[00\] //g" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment