summaryrefslogtreecommitdiff
path: root/test/tc_converters_toutf8.rb
diff options
context:
space:
mode:
authorlnu <lnu@f70e237a-67f3-0310-a06c-d2b8a7116972>2006-01-02 20:08:52 +0000
committerlnu <lnu@f70e237a-67f3-0310-a06c-d2b8a7116972>2006-01-02 20:08:52 +0000
commitc8a7a285dc83f05cbbd8b935fcf1d9c780f77ced (patch)
tree0f2f6a59c2985aaf72173f5e947ef4caa739ff5b /test/tc_converters_toutf8.rb
parentcab3234d550ce0d76c53a22be3376571654b4e09 (diff)
downloadfeed2imap-c8a7a285dc83f05cbbd8b935fcf1d9c780f77ced.tar.gz
feed2imap-c8a7a285dc83f05cbbd8b935fcf1d9c780f77ced.tar.bz2
feed2imap-c8a7a285dc83f05cbbd8b935fcf1d9c780f77ced.zip
Now uses ruby-feedparser for feed parsing
git-svn-id: svn+ssh://svn.gna.org/svn/feed2imap/trunk/feed2imap@73 f70e237a-67f3-0310-a06c-d2b8a7116972
Diffstat (limited to 'test/tc_converters_toutf8.rb')
-rwxr-xr-xtest/tc_converters_toutf8.rb32
1 files changed, 0 insertions, 32 deletions
diff --git a/test/tc_converters_toutf8.rb b/test/tc_converters_toutf8.rb
deleted file mode 100755
index aed8b8f..0000000
--- a/test/tc_converters_toutf8.rb
+++ /dev/null
@@ -1,32 +0,0 @@
-#!/usr/bin/ruby -w
-
-$:.unshift File.join(File.dirname(__FILE__), '..', 'lib')
-
-require 'test/unit'
-require 'feed2imap/textconverters'
-
-class TextConvertersToUTF8Test < Test::Unit::TestCase
- def test_correctencoding
- # tests with inputenc = real input encoding
- assert_equal("coucou", "coucou".toUTF8("utf-8"))
- assert_equal("\303\251\303\250\303\240", "éèà".toUTF8("iso-8859-1"))
- assert_equal("\303\251\303\250\303\240", "éèà".toUTF8("iso-8859-15"))
- assert_equal("\303\251\303\250\303\240", "\303\251\303\250\303\240".toUTF8("utf-8"))
- end
-
- # here comes the fun stuff
- def test_wrongencoding
- # test with inputenc = iso-8859-1 but really utf-8 (should output the UTF-8)
- assert_equal("\303\251\303\250\303\240", "\303\251\303\250\303\240".toUTF8("iso-8859-1"))
-
- # ISO in caps
- assert_equal("\303\251\303\250\303\240", "éèà".toUTF8("ISO-8859-1"))
-
- # UTF-8 in caps
- assert_equal("\303\251\303\250\303\240", "\303\251\303\250\303\240".toUTF8("UTF-8"))
-
- # test with inputenc = utf-8 but really iso-8859-1 (should output the UTF-8)
- # assert_equal("\303\251\303\250\303\240", TextConverters.toUTF8("éèà", "utf-8"))
- # TODO seems it is not do-able
- end
-end