KITAITI Makoto
null+****@clear*****
Sun Sep 20 14:39:08 JST 2015
KITAITI Makoto 2015-09-20 14:39:08 +0900 (Sun, 20 Sep 2015) New Revision: f0112308824d19399f2a28c7441f59ecd939afe8 https://github.com/ranguba/epub-searcher/commit/f0112308824d19399f2a28c7441f59ecd939afe8 Message: Add test case for EPUB files with Japanese characters in thier name Modified files: test/epub-searcher/epub_document_test.rb Modified: test/epub-searcher/epub_document_test.rb (+10 -0) =================================================================== --- test/epub-searcher/epub_document_test.rb 2015-09-20 08:32:15 +0900 (12664da) +++ test/epub-searcher/epub_document_test.rb 2015-09-20 14:39:08 +0900 (90bb2da) @@ -119,6 +119,8 @@ class TestEPUBDocument < Test::Unit::TestCase remove_temporary_directory EPUBSearcher::EPUBFile.temporary_local_dir = temporary_dir_path @document = EPUBSearcher::EPUBDocument.open(@url) + + FileUtils.touch File.join(temporary_dir_path, '日本語.epub') end def teardown @@ -135,6 +137,14 @@ class TestEPUBDocument < Test::Unit::TestCase assert_equal_file_path(expected_path, @document) end + def test_file_path_with_japanese_characters + path = File.join(temporary_dir_path, '日本語.epub') + expected_path = path + assert_nothing_raised do + EPUBSearcher::EPUBFile.new(path) + end + end + def test_remote_file assert_equal(EPUB::Book, @document.epub_book.class) assert_equal_main_text('empty_contributors_single_spine_main_text_expected.txt', @document) -------------- next part -------------- HTML����������������������������...Download