mirror of
https://github.com/miniflux/v2.git
synced 2025-07-02 16:38:37 +00:00
test(encoding): add unit tests for CharsetReader function
This commit is contained in:
parent
7f54b27079
commit
af1f966250
7 changed files with 189 additions and 0 deletions
7
internal/reader/encoding/testdata/invalid-prolog.xml
vendored
Normal file
7
internal/reader/encoding/testdata/invalid-prolog.xml
vendored
Normal file
|
@ -0,0 +1,7 @@
|
|||
<?xml version="1.0" encoding="invalid"?>
|
||||
<feed>
|
||||
<title>테스트 피드</title>
|
||||
<entry>
|
||||
<title>こんにちは世界</title>
|
||||
</entry>
|
||||
</feed>
|
7
internal/reader/encoding/testdata/iso-8859-1.xml
vendored
Normal file
7
internal/reader/encoding/testdata/iso-8859-1.xml
vendored
Normal file
|
@ -0,0 +1,7 @@
|
|||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||
<rss version="2.0">
|
||||
<channel>
|
||||
<title>Café</title>
|
||||
<description>Présentation</description>
|
||||
</channel>
|
||||
</rss>
|
7
internal/reader/encoding/testdata/utf8-incorrect-prolog.xml
vendored
Normal file
7
internal/reader/encoding/testdata/utf8-incorrect-prolog.xml
vendored
Normal file
|
@ -0,0 +1,7 @@
|
|||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||
<feed>
|
||||
<title>테스트 피드</title>
|
||||
<entry>
|
||||
<title>こんにちは世界</title>
|
||||
</entry>
|
||||
</feed>
|
7
internal/reader/encoding/testdata/utf8.xml
vendored
Normal file
7
internal/reader/encoding/testdata/utf8.xml
vendored
Normal file
|
@ -0,0 +1,7 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<feed>
|
||||
<title>테스트 피드</title>
|
||||
<entry>
|
||||
<title>こんにちは世界</title>
|
||||
</entry>
|
||||
</feed>
|
6
internal/reader/encoding/testdata/windows-1252-incorrect-prolog.xml
vendored
Normal file
6
internal/reader/encoding/testdata/windows-1252-incorrect-prolog.xml
vendored
Normal file
|
@ -0,0 +1,6 @@
|
|||
<?xml version="1.0" encoding="windows-1252"?>
|
||||
<rss version="2.0">
|
||||
<channel>
|
||||
<title>Euro €</title>
|
||||
</channel>
|
||||
</rss>
|
6
internal/reader/encoding/testdata/windows-1252.xml
vendored
Normal file
6
internal/reader/encoding/testdata/windows-1252.xml
vendored
Normal file
|
@ -0,0 +1,6 @@
|
|||
<?xml version="1.0" encoding="windows-1252"?>
|
||||
<rss version="2.0">
|
||||
<channel>
|
||||
<title>Euro €</title>
|
||||
</channel>
|
||||
</rss>
|
Loading…
Add table
Add a link
Reference in a new issue