-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
JSHint: Make sure code style is enforced.
- Loading branch information
Showing
9 changed files
with
86 additions
and
38 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
node_modules |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
{ | ||
"camelcase" : true, | ||
"curly" : true, | ||
"eqeqeq" : true, | ||
"freeze" : true, | ||
"immed" : true, | ||
"indent" : 2, | ||
"newcap" : true, | ||
"nonew" : true, | ||
"quotmark" : "single", | ||
"undef" : true, | ||
"unused" : true, | ||
"strict" : true, | ||
"trailing" : true, | ||
"maxlen" : 120, | ||
|
||
"node" : true | ||
} |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -49,10 +49,24 @@ exports.data = [ | |
} | ||
}, | ||
{ | ||
'raw' : new Buffer('Man is distinguished, not only by his reason, but by this singular passion from other animals, which is a lust of the mind, that by a perseverance of delight in the continued and indefatigable generation of knowledge, exceeds the short vehemence of any carnal pleasure', 'ascii'), | ||
'raw' : new Buffer( | ||
'Man is distinguished, not only by his reason, but by this singular passion ' + | ||
'from other animals, which is a lust of the mind, that by a perseverance of ' + | ||
'delight in the continued and indefatigable generation of knowledge, exceeds ' + | ||
'the short vehemence of any carnal pleasure', | ||
'ascii'), | ||
'enc' : { | ||
'ascii85' : '<~9jqo^BlbD-BleB1DJ+*+F(f,q/0JhKF<GL>[email protected]$d7F!,L7@<6@)/0JDEF<G%<+EV:2F!,O<DJ+*.@<*K0@<6L(Df-\\0Ec5e;DffZ(EZee.Bl.9pF"AGXBPCsi+DGm>@3BB/F*&OCAfu2/AKYi(DIb:@FD,*)+C]U=@3BN#EcYf8ATD3s@q?d$AftVqCh[NqF<G:8+EV:.+Cf>-FD5W8ARlolDIal(DId<j@<?3r@:F%a+D58\'ATD4$Bl@l3De:,-DJs`8ARoFb/0JMK@qB4^F!,R<AKZ&-DfTqBG%G>uD.RTpAKYo\'+CT/5+Cei#DII?(E,9)oF*2M7~>', | ||
'z85' : 'o<}]Zx(+zcx(!xgzFa9aB7/b}efF?GBrCHty<vdjC{3^mB0bHmvrlv8efFzABrC4raARphB0bKrzFa9dvr9GfvrlH7z/cXfA=k!qz//V7AV!!dx(do{B1wCTxLy%&azC)tvixxeB95Kyw/#hewGU&7zE+pvBzb98ayYQsvixJ2A=U/nwPzi%v}u^3w/$R}y?WJ}BrCpnaARpday/tcBzkSnwN(](zE:(7zE^r<vrui@vpB4:azkn6wPzj3x(v(iz!pbczF%-nwN]B+efFIGv}xjZB0bNrwGV5cz/P}xC4Ct#zdNP{wGU]6ayPekay!&2zEEu7Abo8]B9hIm' | ||
'ascii85' : '<~9jqo^BlbD-BleB1DJ+*+F(f,q/0JhKF<GL>[email protected]$d7F!,L7@<6@)/0JDEF' + | ||
'<G%<+EV:2F!,O<DJ+*.@<*K0@<6L(Df-\\0Ec5e;DffZ(EZee.Bl.9pF"AGXBPC' + | ||
'si+DGm>@3BB/F*&OCAfu2/AKYi(DIb:@FD,*)+C]U=@3BN#EcYf8ATD3s@q?d$A' + | ||
'ftVqCh[NqF<G:8+EV:.+Cf>-FD5W8ARlolDIal(DId<j@<?3r@:F%a+D58\'ATD' + | ||
'4$Bl@l3De:,-DJs`8ARoFb/0JMK@qB4^F!,R<AKZ&-DfTqBG%G>uD.RTpAKYo\'' + | ||
'+CT/5+Cei#DII?(E,9)oF*2M7~>', | ||
'z85' : 'o<}]Zx(+zcx(!xgzFa9aB7/b}efF?GBrCHty<vdjC{3^mB0bHmvrlv8efFzABrC4raA' + | ||
'RphB0bKrzFa9dvr9GfvrlH7z/cXfA=k!qz//V7AV!!dx(do{B1wCTxLy%&azC)tvixx' + | ||
'eB95Kyw/#hewGU&7zE+pvBzb98ayYQsvixJ2A=U/nwPzi%v}u^3w/$R}y?WJ}BrCpna' + | ||
'ARpday/tcBzkSnwN(](zE:(7zE^r<vrui@vpB4:azkn6wPzj3x(v(iz!pbczF%-nwN]' + | ||
'B+efFIGv}xjZB0bNrwGV5cz/P}xC4Ct#zdNP{wGU]6ayPekay!&2zEEu7Abo8]B9hIm' | ||
} | ||
}, | ||
{ | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,16 @@ | ||
'use strict'; | ||
|
||
var _ = require('underscore'); | ||
var base85 = require('../lib/base85'); | ||
var data = require('./data').data; | ||
|
||
exports.testErrors = function(test) | ||
{ | ||
test.equal(base85.decode(1234, 'ascii85'), false) | ||
test.equal(base85.decode(1234, 'ascii85'), false); | ||
test.equal(base85.decode('<~u~>', 'ascii85'), false); | ||
test.equal(base85.decode('<~uuuuu~>', 'ascii85'), false); | ||
test.done(); | ||
} | ||
}; | ||
|
||
exports.testBasic = function(test) | ||
{ | ||
|
@@ -23,16 +25,16 @@ exports.testBasic = function(test) | |
}); | ||
|
||
test.done(); | ||
} | ||
}; | ||
|
||
exports.testWhiteSpace = function(test) | ||
{ | ||
test.deepEqual(base85.decode("<~\n@p\ns7\ntD.3~>", 'ascii85'), new Buffer('canumb')); | ||
test.deepEqual(base85.decode("<~\n @ p \ns7 \n t D .3~>", 'ascii85'), new Buffer('canumb')); | ||
test.deepEqual(base85.decode("<~\n @ p \ns7 \n t D .3 ~>", 'ascii85'), new Buffer('canumb')); | ||
test.deepEqual(base85.decode("<[email protected] \n ~>", 'ascii85'), new Buffer('canumb')); | ||
test.deepEqual(base85.decode("<~ @ps7tD.3 \n ~>", 'ascii85'), new Buffer('canumb')); | ||
test.deepEqual(base85.decode('<~\n@p\ns7\ntD.3~>', 'ascii85'), new Buffer('canumb')); | ||
test.deepEqual(base85.decode('<~\n @ p \ns7 \n t D .3~>', 'ascii85'), new Buffer('canumb')); | ||
test.deepEqual(base85.decode('<~\n @ p \ns7 \n t D .3 ~>', 'ascii85'), new Buffer('canumb')); | ||
test.deepEqual(base85.decode('<[email protected] \n ~>', 'ascii85'), new Buffer('canumb')); | ||
test.deepEqual(base85.decode('<~ @ps7tD.3 \n ~>', 'ascii85'), new Buffer('canumb')); | ||
|
||
test.deepEqual(base85.decode('v{ \n % \t m$z di'), new Buffer('canumb')); | ||
test.done(); | ||
} | ||
}; |
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