[Groonga-commit] ranguba/chupa-text-decomposer-libreoffice at b8bf048 [master] test: fix type

Back to archive index

Kouhei Sutou null+****@clear*****
Tue Feb 18 00:43:19 JST 2014


Kouhei Sutou	2014-02-18 00:43:19 +0900 (Tue, 18 Feb 2014)

  New Revision: b8bf0488284c93520239f4adf1f5916b63fbad2b
  https://github.com/ranguba/chupa-text-decomposer-libreoffice/commit/b8bf0488284c93520239f4adf1f5916b63fbad2b

  Message:
    test: fix type

  Modified files:
    test/helper.rb
    test/test-doc.rb
    test/test-docx.rb
    test/test-odp.rb
    test/test-ods.rb
    test/test-odt.rb
    test/test-ppt.rb
    test/test-pptx.rb
    test/test-xls.rb
    test/test-xlsx.rb

  Modified: test/helper.rb (+6 -1)
===================================================================
--- test/helper.rb    2014-02-18 00:16:23 +0900 (09a1523)
+++ test/helper.rb    2014-02-18 00:43:19 +0900 (3da158d)
@@ -43,8 +43,13 @@ module DecomposeHelper
     decomposed
   end
 
+  def normalize_producers(producers)
+    producers.collect do |producer|
+      normalize_producer(producer)
+    end
+  end
+
   def normalize_producer(producer)
-    return nil if producer.nil?
     if /\ALibreOffice \d\.\d\z/ =~ producer
       "LibreOffice X.Y"
     else

  Modified: test/test-doc.rb (+1 -1)
===================================================================
--- test/test-doc.rb    2014-02-18 00:16:23 +0900 (6fff3c2)
+++ test/test-doc.rb    2014-02-18 00:43:19 +0900 (5f555d0)
@@ -81,7 +81,7 @@ class TestDoc < Test::Unit::TestCase
 
       def test_producer
         assert_equal(["LibreOffice X.Y"],
-                     normalize_producer(decompose("producer")))
+                     normalize_producers(decompose("producer")))
       end
 
       def test_creation_date

  Modified: test/test-docx.rb (+1 -1)
===================================================================
--- test/test-docx.rb    2014-02-18 00:16:23 +0900 (7c9c6b0)
+++ test/test-docx.rb    2014-02-18 00:43:19 +0900 (107a00f)
@@ -81,7 +81,7 @@ class TestDocx < Test::Unit::TestCase
 
       def test_producer
         assert_equal(["LibreOffice X.Y"],
-                     normalize_producer(decompose("producer")))
+                     normalize_producers(decompose("producer")))
       end
 
       def test_creation_date

  Modified: test/test-odp.rb (+1 -1)
===================================================================
--- test/test-odp.rb    2014-02-18 00:16:23 +0900 (124a28c)
+++ test/test-odp.rb    2014-02-18 00:43:19 +0900 (3435b8f)
@@ -83,7 +83,7 @@ class TestOdp < Test::Unit::TestCase
 
       def test_producer
         assert_equal(["LibreOffice X.Y"],
-                     normalize_producer(decompose("producer")))
+                     normalize_producers(decompose("producer")))
       end
 
       def test_creation_date

  Modified: test/test-ods.rb (+1 -1)
===================================================================
--- test/test-ods.rb    2014-02-18 00:16:23 +0900 (c7e98e9)
+++ test/test-ods.rb    2014-02-18 00:43:19 +0900 (ea41771)
@@ -81,7 +81,7 @@ class TestOds < Test::Unit::TestCase
 
       def test_producer
         assert_equal(["LibreOffice X.Y"],
-                     normalize_producer(decompose("producer")))
+                     normalize_producers(decompose("producer")))
       end
 
       def test_creation_date

  Modified: test/test-odt.rb (+1 -1)
===================================================================
--- test/test-odt.rb    2014-02-18 00:16:23 +0900 (01ba976)
+++ test/test-odt.rb    2014-02-18 00:43:19 +0900 (63627fd)
@@ -81,7 +81,7 @@ class TestOdt < Test::Unit::TestCase
 
       def test_producer
         assert_equal(["LibreOffice X.Y"],
-                     normalize_producer(decompose("producer")))
+                     normalize_producers(decompose("producer")))
       end
 
       def test_creation_date

  Modified: test/test-ppt.rb (+1 -1)
===================================================================
--- test/test-ppt.rb    2014-02-18 00:16:23 +0900 (27c3ebd)
+++ test/test-ppt.rb    2014-02-18 00:43:19 +0900 (453fc4e)
@@ -83,7 +83,7 @@ class TestPpt < Test::Unit::TestCase
 
       def test_producer
         assert_equal(["LibreOffice X.Y"],
-                     normalize_producer(decompose("producer")))
+                     normalize_producers(decompose("producer")))
       end
 
       def test_creation_date

  Modified: test/test-pptx.rb (+1 -1)
===================================================================
--- test/test-pptx.rb    2014-02-18 00:16:23 +0900 (153b875)
+++ test/test-pptx.rb    2014-02-18 00:43:19 +0900 (d56b2a0)
@@ -87,7 +87,7 @@ class TestPptx < Test::Unit::TestCase
 
       def test_producer
         assert_equal(["LibreOffice X.Y"],
-                     normalize_producer(decompose("producer")))
+                     normalize_producers(decompose("producer")))
       end
 
       def test_creation_date

  Modified: test/test-xls.rb (+1 -1)
===================================================================
--- test/test-xls.rb    2014-02-18 00:16:23 +0900 (ece12ca)
+++ test/test-xls.rb    2014-02-18 00:43:19 +0900 (81bfa35)
@@ -81,7 +81,7 @@ class TestXls < Test::Unit::TestCase
 
       def test_producer
         assert_equal(["LibreOffice X.Y"],
-                     normalize_producer(decompose("producer")))
+                     normalize_producers(decompose("producer")))
       end
 
       def test_creation_date

  Modified: test/test-xlsx.rb (+1 -1)
===================================================================
--- test/test-xlsx.rb    2014-02-18 00:16:23 +0900 (49d3042)
+++ test/test-xlsx.rb    2014-02-18 00:43:19 +0900 (a9617a4)
@@ -81,7 +81,7 @@ class TestXlsx < Test::Unit::TestCase
 
       def test_producer
         assert_equal(["LibreOffice X.Y"],
-                     normalize_producer(decompose("producer")))
+                     normalize_producers(decompose("producer")))
       end
 
       def test_creation_date
-------------- next part --------------
HTML����������������������������...
Download 



More information about the Groonga-commit mailing list
Back to archive index