base85: fix a bug with accidental extra characters in alphabet.
parent
0ae9b17734
commit
1ff2722b15
|
@ -1,6 +1,7 @@
|
||||||
USING: base85 kernel strings tools.test ;
|
USING: base85 kernel strings tools.test ;
|
||||||
|
|
||||||
{ t } [ "Hello, world" dup >base85 base85> >string = ] unit-test
|
{ t } [ "Hello, world" dup >base85 base85> >string = ] unit-test
|
||||||
|
{ t } [ "ready" dup >base85 base85> >string = ] unit-test
|
||||||
|
|
||||||
{ "NM!&3" } [ "He" >base85 >string ] unit-test
|
{ "NM!&3" } [ "He" >base85 >string ] unit-test
|
||||||
{ t } [ "He" dup >base85 base85> >string = ] unit-test
|
{ t } [ "He" dup >base85 base85> >string = ] unit-test
|
||||||
|
|
|
@ -11,7 +11,7 @@ ERROR: malformed-base85 ;
|
||||||
|
|
||||||
<<
|
<<
|
||||||
CONSTANT: alphabet
|
CONSTANT: alphabet
|
||||||
"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz!#$%&()*+-;<=>?@^_`{|}~\";"
|
"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz!#$%&()*+-;<=>?@^_`{|}~"
|
||||||
>>
|
>>
|
||||||
: ch>base85 ( ch -- ch )
|
: ch>base85 ( ch -- ch )
|
||||||
alphabet nth ; inline
|
alphabet nth ; inline
|
||||||
|
|
Loading…
Reference in New Issue