Created
January 24, 2011 02:29
-
-
Save hideki/792722 to your computer and use it in GitHub Desktop.
Customized nodejs test file: Use md5sum instead of shasum
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
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
function maybeMakeRequest () { | |
if (++count < 2) return; | |
console.log("making curl request"); | |
// change from shasum to md5sum | |
//cp.exec('curl http://127.0.0.1:' + common.PORT + '/ | shasum', | |
cp.exec('curl http://127.0.0.1:' + common.PORT + '/ | md5sum', | |
function (err, stdout, stderr) { | |
if (err) throw err; | |
// change output | |
//assert.equal('8c206a1a87599f532ce68675536f0b1546900d7a', stdout.slice(0, 40)); | |
assert.equal('f1c9645dbc14efddc7d8a322685f26eb', stdout.slice(0, 32)); | |
console.log("got the correct response"); | |
server.close(); | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment