Skip to content

Instantly share code, notes, and snippets.

@exodist
Created May 30, 2016 14:50
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save exodist/ef4650054e9f908523dc29beafdce160 to your computer and use it in GitHub Desktop.
Save exodist/ef4650054e9f908523dc29beafdce160 to your computer and use it in GitHub Desktop.
minimal inline testing
sub ok($;$) {$_[0] || $T::FAIL++; print( ($_[0] ? "ok " : "not ok ") . ++$T::NUM . ($_[1] ? " - $_[1]\n" : "\n"))}
sub done_testing { print "1..$T::NUM\n" }
END { $? ||= $T::FAIL; $? = 255 if $? > 255 }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment