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:

        zm9...@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-unsubscr...@commons.apache.org
For additional commands, e-mail: dev-h...@commons.apache.org

Reply via email to