[Pkg-javascript-commits] [node-sha.js] 86/237: test coverage for binary encoding
Bastien Roucariès
rouca at moszumanska.debian.org
Fri May 5 09:03:38 UTC 2017
This is an automated email from the git hooks/post-receive script.
rouca pushed a commit to branch master
in repository node-sha.js.
commit 96e417cd12df156f6f0d3608bdd62ef9d661c41d
Author: Dominic Tarr <dominic.tarr at gmail.com>
Date: Mon Jan 6 16:24:03 2014 +0700
test coverage for binary encoding
---
test/enc.js | 3 +++
1 file changed, 3 insertions(+)
diff --git a/test/enc.js b/test/enc.js
index 20f132b..d191590 100644
--- a/test/enc.js
+++ b/test/enc.js
@@ -27,10 +27,13 @@ tape('base64', function (t) {
tape('all input encodings work', function (t) {
var hex = new Sha1().update(toString(EMPTY, 'hex'), 'hex').digest('hex')
var base64 = new Sha1().update(toString(EMPTY, 'base64'), 'base64').digest('hex')
+ console.log('Binary:', JSON.stringify(toString(EMPTY, 'binary')))
+ var binary = new Sha1().update(toString(EMPTY, 'binary'), 'binary').digest('hex')
var buffer = new Sha1().update(EMPTY).digest('hex')
console.log(hex, base64, buffer)
t.equal(hex, base64)
t.equal(hex, buffer)
+ t.equal(hex, binary)
t.end()
})
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/node-sha.js.git
More information about the Pkg-javascript-commits
mailing list