Created
October 11, 2014 06:53
-
-
Save pingjiang/a4060fb0971446a276f0 to your computer and use it in GitHub Desktop.
generate mocha testcase
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 | |
F=fixtures.md | |
for rar in `ls *.rar` | |
do | |
echo "it('test extract $rar', function() {" | |
echo "rar.extract('./test/fixtures/${rar}', './tmp/'); " | |
echo "var expected = [" | |
unrar lb $rar | sed -e 's/^/ "/' | sed -e 's/$/", /' | |
echo "]; " | |
echo "EXISTS_FILES(expected); " | |
echo "});" | |
echo "" | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment