Created
July 23, 2014 19:41
-
-
Save textarcana/6372a49c992b35a7d7e6 to your computer and use it in GitHub Desktop.
A simple test runner in bash and Perl.
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
perl -lwne 'BEGIN{$status=0; | |
print "tests running..."}; | |
print qq{$_:}; | |
$result = qx{curl -s -IL $_ | grep "200 OK"}; | |
if ($result eq ""){print "FAIL\n"; $status=1} else {print $result}; | |
END{if($status != 0){print "Some tests failed."} else {print "All done!"}; | |
exit $status}' test.config |
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
mtv.com | |
dailyshow.com | |
NOTAREALSITEcc.com |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment