github.com/NeowayLabs/nash@v0.2.2-0.20200127205349-a227041ffd50/stdbin/write/common_test.sh (about) 1 # common test routines 2 3 fn fatal(msg) { 4 print($msg) 5 exit("1") 6 } 7 8 fn assert(expected, got, desc) { 9 if $expected != $got { 10 fatal(format("%s: FAILED. Expected[%s] but got[%s]\n", $desc, $expected, $got)) 11 } 12 }