[Pkg-javascript-commits] [node-shasum] 06/23: test that hash is same for buffer as for string

Bastien Roucariès rouca at moszumanska.debian.org
Fri May 5 09:06:23 UTC 2017


This is an automated email from the git hooks/post-receive script.

rouca pushed a commit to branch master
in repository node-shasum.

commit f78f074ecd2de60bf08cb75be7e7ecceaa8dcbb1
Author: Dominic Tarr <dominic.tarr at gmail.com>
Date:   Wed Jun 12 18:26:00 2013 +0200

    test that hash is same for buffer as for string
---
 test/index.js | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/test/index.js b/test/index.js
index 7077324..9a9c8e7 100644
--- a/test/index.js
+++ b/test/index.js
@@ -8,5 +8,7 @@ equal(hash({}),     'bf21a9e8fbc5a3846fb05b4fa0859e0917b2202f')
 equal(hash([]),     '97d170e1550eee4afc0af065b78cda302a97674c')
 equal(hash(new Buffer('abc')),
                     'a9993e364706816aba3e25717850c26c9cd0d89d')
-
+equal(hash('ab\xff'),'ba5142a8207bd61baddf325088732e71cbfe8eb6')
+equal(hash(new Buffer('ab\xff').toString()),
+                    'ba5142a8207bd61baddf325088732e71cbfe8eb6')
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/node-shasum.git



More information about the Pkg-javascript-commits mailing list