Skip to content

Commit

Permalink
golf lol
Browse files Browse the repository at this point in the history
  • Loading branch information
kspalaiologos committed Jan 6, 2021
1 parent bd1b199 commit 1a0b2d3
Showing 1 changed file with 4 additions and 17 deletions.
21 changes: 4 additions & 17 deletions test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,10 @@

TEST_JIT=$#

_log() {
echo -n "$(tput setaf 6)$2 $(tput setaf 5)$1$(tput sgr0) $(printf '.%.0s' $(seq 1 70))" | head -c 70
}

_ok() {
echo "$(tput setaf 2) [OK] $(tput sgr0)"
}

_fail() {
echo "$(tput setaf 1) [FAIL] $(tput sgr0)\n$1"
exit 1
}

_if_error() {
[ $(wc -c < "$1.err") -ne 0 ] && _fail $(cat "$1.err")
rm -f "$1.err"
}
_log() { echo -n "$(tput setaf 6)$2 $(tput setaf 5)$1$(tput sgr0) $(printf '.%.0s' $(seq 1 70))" | head -c 70; }
_ok() { echo "$(tput setaf 2) [OK] $(tput sgr0)"; }
_fail() { echo "$(tput setaf 1) [FAIL] $(tput sgr0)\n$1"; exit 1; }
_if_error() { [ $(wc -c < "$1.err") -ne 0 ] && _fail $(cat "$1.err"); rm -f "$1.err"; }

_interpreter() {
_log "$1" "$3"
Expand Down

0 comments on commit 1a0b2d3

Please sign in to comment.