Skip to content

Instantly share code, notes, and snippets.

@hideki
Created January 24, 2011 02:29
Show Gist options
  • Save hideki/792722 to your computer and use it in GitHub Desktop.
Save hideki/792722 to your computer and use it in GitHub Desktop.
Customized nodejs test file: Use md5sum instead of shasum
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