commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gary Gregory <GGreg...@seagullsoftware.com>
Subject RE: svn commit: r928129 - /commons/proper/codec/trunk/src/test/org/apache/commons/codec/binary/Base64Test.java
Date Sat, 27 Mar 2010 23:06:25 GMT
Fixed in SVN. Thank you Julius.

Gary Gregory
Senior Software Engineer
Seagull Software
email: ggregory@seagullsoftware.com
email: ggregory@apache.org
www.seagullsoftware.com 



> -----Original Message-----
> From: Julius Davies [mailto:juliusdavies@gmail.com]
> Sent: Friday, March 26, 2010 22:22
> To: dev@commons.apache.org
> Subject: Re: svn commit: r928129 -
> /commons/proper/codec/trunk/src/test/org/apache/commons/codec/binary/Ba
> se64Test.java
> 
> Hi,
> 
> I think there's a mistake here (even though it's commented out):
> 
> //assertEquals("foo",
> StringUtils.newStringUsAscii(Base64.decodeBase64("Zm9v" +
> Base64.CHUNK_SEPARATOR)));
> 
> 
> Consider output of following:
> 
>         String s = "Zm9v" + Base64.CHUNK_SEPARATOR;
>         System.out.println(s);
> 
> The output is:
> 
>         Zm9v[B@6bbc4459
> 
> 
> I've attached a fix to CODEC-99 as 'codec-99-test-fixes.patch'.
> 
> 
> yours,
> 
> Julius
> 
> 
> > +    public void testRfc4648Section10DecodeWithCrLf() {
> > +        assertEquals("",
> StringUtils.newStringUsAscii(Base64.decodeBase64("")));
> > +        assertEquals("f",
> StringUtils.newStringUsAscii(Base64.decodeBase64("Zg==" +
> Base64.CHUNK_SEPARATOR)));
> > +        assertEquals("fo",
> StringUtils.newStringUsAscii(Base64.decodeBase64("Zm8=" +
> Base64.CHUNK_SEPARATOR)));
> > +        //assertEquals("foo",
> StringUtils.newStringUsAscii(Base64.decodeBase64("Zm9v" +
> Base64.CHUNK_SEPARATOR)));
> > +        assertEquals("foob",
> StringUtils.newStringUsAscii(Base64.decodeBase64("Zm9vYg==" +
> Base64.CHUNK_SEPARATOR)));
> > +        assertEquals("fooba",
> StringUtils.newStringUsAscii(Base64.decodeBase64("Zm9vYmE=" +
> Base64.CHUNK_SEPARATOR)));
> > +        //assertEquals("foobar",
> StringUtils.newStringUsAscii(Base64.decodeBase64("Zm9vYmFy" +
> Base64.CHUNK_SEPARATOR)));
> > +    }
> > +
> 
> 
> 
> --
> yours,
> 
> Julius Davies
> 250-592-2284 (Home)
> 250-893-4579 (Mobile)
> 
> $ sudo apt-get install cowsay
> $ echo "Moo." | cowsay | cowsay -n | cowsay -n
> http://juliusdavies.ca/cowsay/
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> For additional commands, e-mail: dev-help@commons.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Mime
View raw message