mirror of
https://github.com/Athou/commafeed.git
synced 2026-03-21 21:37:29 +00:00
support for single quotes (#681)
This commit is contained in:
@@ -3,8 +3,6 @@ package com.commafeed.backend.feed;
|
||||
import org.junit.Assert;
|
||||
import org.junit.Test;
|
||||
|
||||
import com.commafeed.backend.feed.FeedUtils;
|
||||
|
||||
public class FeedUtilsTest {
|
||||
|
||||
@Test
|
||||
@@ -55,4 +53,13 @@ public class FeedUtilsTest {
|
||||
FeedUtils.toAbsoluteUrl("elisp_all_about_lines.html", "blog.xml", "http://ergoemacs.org/emacs/blog.xml"));
|
||||
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testExtractDeclaredEncoding() {
|
||||
Assert.assertNull(FeedUtils.extractDeclaredEncoding("<?xml ?>".getBytes()));
|
||||
Assert.assertNull(FeedUtils.extractDeclaredEncoding("<feed></feed>".getBytes()));
|
||||
Assert.assertEquals("UTF-8", FeedUtils.extractDeclaredEncoding("<?xml encoding=\"UTF-8\" ?>".getBytes()));
|
||||
Assert.assertEquals("UTF-8", FeedUtils.extractDeclaredEncoding("<?xml encoding='UTF-8' ?>".getBytes()));
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user