Created
October 11, 2014 04:55
-
-
Save pingjiang/c6eecfd1b033550b09a0 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 $rar', function() {" | |
echo "var entries = rar.list('./test/fixtures/${rar}'); " | |
echo "var expected = [" | |
unrar lb $rar | sed -e 's/^/ "/' | sed -e 's/$/", /' | |
echo "]; " | |
echo "// assert.deepEqual(entries, expected);" | |
echo "console.log(entries); " | |
echo "});" | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment