[Groonga-commit] groonga/groonga [master] re-support environment variable change.

アーカイブの一覧に戻る

null+****@clear***** null+****@clear*****
2010年 11月 24日 (水) 11:26:01 JST


Kouhei Sutou	2010-11-24 02:26:01 +0000 (Wed, 24 Nov 2010)

  New Revision: 6b108de01bb93d76258882f63d4c8bca44816832

  Log:
    re-support environment variable change.

  Modified files:
    test/unit/lib/ruby/groonga-test-utils.rb

  Modified: test/unit/lib/ruby/groonga-test-utils.rb (+4 -1)
===================================================================
--- test/unit/lib/ruby/groonga-test-utils.rb    2010-11-24 02:10:03 +0000 (0e404f7)
+++ test/unit/lib/ruby/groonga-test-utils.rb    2010-11-24 02:26:01 +0000 (40e3b91)
@@ -211,7 +211,9 @@ module GroongaTestUtils
   end
 
   def invoke_groonga(*args)
+    environment = args.first.is_a?(Hash) ? args.shift : {}
     args.unshift(groonga)
+    args.unshift(environment)
     invoke_command(*args)
   end
 
@@ -227,7 +229,8 @@ module GroongaTestUtils
     unless rest.empty?
       raise ArgumentError, "wrong number of arguments (#{argnum} for 3)"
     end
-    args << options.merge(:input => stdin,
+    args = [args] unless args.is_a?(Array)
+    args << options.merge(:input => input,
                           :capture_output => true,
                           :capture_error => true)
     stdout, stderr, status = invoke_groonga(*args)




Groonga-commit メーリングリストの案内
アーカイブの一覧に戻る