[ruby-oci8-commit] [277] trunk/ruby-oci8: * test/config.rb, test/test_all.rb, test/ test_array_dml.rb,

nobody at rubyforge.org nobody at rubyforge.org
Tue Aug 5 09:53:55 EDT 2008


Revision: 277
Author:   kubo
Date:     2008-08-05 09:53:55 -0400 (Tue, 05 Aug 2008)

Log Message:
-----------
* test/config.rb, test/test_all.rb, test/test_array_dml.rb,
  test/test_bind_raw.rb, test/test_bind_time.rb, test/test_break.rb,
  test/test_clob.rb, test/test_connstr.rb, test/test_datetime.rb,
  test/test_dbi.rb, test/test_dbi_clob.rb, test/test_metadata.rb,
  test/test_object.rb, test/test_oci8.rb, test/test_oradate.rb,
  test/test_oranumber.rb, test/test_rowid.rb:
    fix to run tests in directories outside of 'test' directory.

Modified Paths:
--------------
    trunk/ruby-oci8/ChangeLog
    trunk/ruby-oci8/test/test_all.rb
    trunk/ruby-oci8/test/test_array_dml.rb
    trunk/ruby-oci8/test/test_bind_raw.rb
    trunk/ruby-oci8/test/test_bind_time.rb
    trunk/ruby-oci8/test/test_break.rb
    trunk/ruby-oci8/test/test_clob.rb
    trunk/ruby-oci8/test/test_connstr.rb
    trunk/ruby-oci8/test/test_datetime.rb
    trunk/ruby-oci8/test/test_dbi.rb
    trunk/ruby-oci8/test/test_dbi_clob.rb
    trunk/ruby-oci8/test/test_metadata.rb
    trunk/ruby-oci8/test/test_object.rb
    trunk/ruby-oci8/test/test_oci8.rb
    trunk/ruby-oci8/test/test_oradate.rb
    trunk/ruby-oci8/test/test_oranumber.rb
    trunk/ruby-oci8/test/test_rowid.rb

Modified: trunk/ruby-oci8/ChangeLog
===================================================================
--- trunk/ruby-oci8/ChangeLog	2008-08-05 13:51:30 UTC (rev 276)
+++ trunk/ruby-oci8/ChangeLog	2008-08-05 13:53:55 UTC (rev 277)
@@ -1,3 +1,12 @@
+2008-08-05  KUBO Takehiro  <kubo at jiubao.org>
+	* test/config.rb, test/test_all.rb, test/test_array_dml.rb,
+	  test/test_bind_raw.rb, test/test_bind_time.rb, test/test_break.rb,
+	  test/test_clob.rb, test/test_connstr.rb, test/test_datetime.rb,
+	  test/test_dbi.rb, test/test_dbi_clob.rb, test/test_metadata.rb,
+	  test/test_object.rb, test/test_oci8.rb, test/test_oradate.rb,
+	  test/test_oranumber.rb, test/test_rowid.rb:
+	    fix to run tests in directories outside of 'test' directory.
+
 2008-08-04  KUBO Takehiro  <kubo at jiubao.org>
 	* ext/oci8/attr.c: If ORA-01000 (maximum open cursors exceeded) when
 	    converting a rowid descriptor to string representation, run

Modified: trunk/ruby-oci8/test/test_all.rb
===================================================================
--- trunk/ruby-oci8/test/test_all.rb	2008-08-05 13:51:30 UTC (rev 276)
+++ trunk/ruby-oci8/test/test_all.rb	2008-08-05 13:53:55 UTC (rev 277)
@@ -2,7 +2,7 @@
 
 require 'oci8'
 require 'test/unit'
-require './config'
+require "#{srcdir}/config"
 
 require "#{srcdir}/test_oradate"
 require "#{srcdir}/test_oranumber"

Modified: trunk/ruby-oci8/test/test_array_dml.rb
===================================================================
--- trunk/ruby-oci8/test/test_array_dml.rb	2008-08-05 13:51:30 UTC (rev 276)
+++ trunk/ruby-oci8/test/test_array_dml.rb	2008-08-05 13:53:55 UTC (rev 277)
@@ -1,6 +1,6 @@
 require 'oci8'
 require 'test/unit'
-require './config'
+require File.dirname(__FILE__) + '/config'
 
 class TestArrayDML < Test::Unit::TestCase
   def setup

Modified: trunk/ruby-oci8/test/test_bind_raw.rb
===================================================================
--- trunk/ruby-oci8/test/test_bind_raw.rb	2008-08-05 13:51:30 UTC (rev 276)
+++ trunk/ruby-oci8/test/test_bind_raw.rb	2008-08-05 13:53:55 UTC (rev 277)
@@ -1,7 +1,7 @@
 # Low-level API
 require 'oci8'
 require 'test/unit'
-require './config'
+require File.dirname(__FILE__) + '/config'
 
 class TestBindRaw < Test::Unit::TestCase
   CHECK_TARGET = [

Modified: trunk/ruby-oci8/test/test_bind_time.rb
===================================================================
--- trunk/ruby-oci8/test/test_bind_time.rb	2008-08-05 13:51:30 UTC (rev 276)
+++ trunk/ruby-oci8/test/test_bind_time.rb	2008-08-05 13:53:55 UTC (rev 277)
@@ -1,6 +1,6 @@
 require 'oci8'
 require 'test/unit'
-require './config'
+require File.dirname(__FILE__) + '/config'
 
 class TestBindTime < Test::Unit::TestCase
 

Modified: trunk/ruby-oci8/test/test_break.rb
===================================================================
--- trunk/ruby-oci8/test/test_break.rb	2008-08-05 13:51:30 UTC (rev 276)
+++ trunk/ruby-oci8/test/test_break.rb	2008-08-05 13:53:55 UTC (rev 277)
@@ -1,7 +1,7 @@
 # High-level API
 require 'oci8'
 require 'test/unit'
-require './config'
+require File.dirname(__FILE__) + '/config'
 
 class TestBreak < Test::Unit::TestCase
 

Modified: trunk/ruby-oci8/test/test_clob.rb
===================================================================
--- trunk/ruby-oci8/test/test_clob.rb	2008-08-05 13:51:30 UTC (rev 276)
+++ trunk/ruby-oci8/test/test_clob.rb	2008-08-05 13:53:55 UTC (rev 277)
@@ -1,7 +1,7 @@
 # Low-level API
 require 'oci8'
 require 'test/unit'
-require './config'
+require File.dirname(__FILE__) + '/config'
 
 class TestCLob < Test::Unit::TestCase
 
@@ -10,9 +10,10 @@
   end
 
   def test_insert
-    @conn.exec("DELETE FROM test_clob WHERE filename = :1", $lobfile)
-    @conn.exec("INSERT INTO test_clob(filename, content) VALUES (:1, EMPTY_CLOB())", $lobfile)
-    cursor = @conn.exec("SELECT content FROM test_clob WHERE filename = :1 FOR UPDATE", $lobfile)
+    filename = File.basename($lobfile)
+    @conn.exec("DELETE FROM test_clob WHERE filename = :1", filename)
+    @conn.exec("INSERT INTO test_clob(filename, content) VALUES (:1, EMPTY_CLOB())", filename)
+    cursor = @conn.exec("SELECT content FROM test_clob WHERE filename = :1 FOR UPDATE", filename)
     lob = cursor.fetch[0]
     open($lobfile) do |f|
       while f.gets()
@@ -23,9 +24,10 @@
   end
 
   def test_insert_with_flush
-    @conn.exec("DELETE FROM test_clob WHERE filename = :1", $lobfile)
-    @conn.exec("INSERT INTO test_clob(filename, content) VALUES (:1, EMPTY_CLOB())", $lobfile)
-    cursor = @conn.exec("SELECT content FROM test_clob WHERE filename = :1 FOR UPDATE", $lobfile)
+    filename = File.basename($lobfile)
+    @conn.exec("DELETE FROM test_clob WHERE filename = :1", filename)
+    @conn.exec("INSERT INTO test_clob(filename, content) VALUES (:1, EMPTY_CLOB())", filename)
+    cursor = @conn.exec("SELECT content FROM test_clob WHERE filename = :1 FOR UPDATE", filename)
     lob = cursor.fetch[0]
     lob.sync = false
     open($lobfile) do |f|
@@ -39,7 +41,8 @@
 
   def test_read
     test_insert() # first insert data.
-    cursor = @conn.exec("SELECT content FROM test_clob WHERE filename = :1 FOR UPDATE", $lobfile)
+    filename = File.basename($lobfile)
+    cursor = @conn.exec("SELECT content FROM test_clob WHERE filename = :1 FOR UPDATE", filename)
     lob = cursor.fetch[0]
 
     open($lobfile) do |f|

Modified: trunk/ruby-oci8/test/test_connstr.rb
===================================================================
--- trunk/ruby-oci8/test/test_connstr.rb	2008-08-05 13:51:30 UTC (rev 276)
+++ trunk/ruby-oci8/test/test_connstr.rb	2008-08-05 13:53:55 UTC (rev 277)
@@ -1,6 +1,6 @@
 require 'oci8'
 require 'test/unit'
-require './config'
+require File.dirname(__FILE__) + '/config'
 
 class TestConnStr < Test::Unit::TestCase
   TEST_CASES =

Modified: trunk/ruby-oci8/test/test_datetime.rb
===================================================================
--- trunk/ruby-oci8/test/test_datetime.rb	2008-08-05 13:51:30 UTC (rev 276)
+++ trunk/ruby-oci8/test/test_datetime.rb	2008-08-05 13:53:55 UTC (rev 277)
@@ -1,6 +1,6 @@
 require 'oci8'
 require 'test/unit'
-require './config'
+require File.dirname(__FILE__) + '/config'
 require 'scanf'
 
 class TestDateTime < Test::Unit::TestCase

Modified: trunk/ruby-oci8/test/test_dbi.rb
===================================================================
--- trunk/ruby-oci8/test/test_dbi.rb	2008-08-05 13:51:30 UTC (rev 276)
+++ trunk/ruby-oci8/test/test_dbi.rb	2008-08-05 13:53:55 UTC (rev 277)
@@ -1,7 +1,7 @@
 require 'dbi'
 require 'oci8'
 require 'test/unit'
-require './config'
+require File.dirname(__FILE__) + '/config'
 
 class TestDBI < Test::Unit::TestCase
 

Modified: trunk/ruby-oci8/test/test_dbi_clob.rb
===================================================================
--- trunk/ruby-oci8/test/test_dbi_clob.rb	2008-08-05 13:51:30 UTC (rev 276)
+++ trunk/ruby-oci8/test/test_dbi_clob.rb	2008-08-05 13:53:55 UTC (rev 277)
@@ -1,6 +1,6 @@
 require 'dbi'
 require 'test/unit'
-require './config'
+require File.dirname(__FILE__) + '/config'
 
 class TestDbiCLob < Test::Unit::TestCase
 

Modified: trunk/ruby-oci8/test/test_metadata.rb
===================================================================
--- trunk/ruby-oci8/test/test_metadata.rb	2008-08-05 13:51:30 UTC (rev 276)
+++ trunk/ruby-oci8/test/test_metadata.rb	2008-08-05 13:53:55 UTC (rev 277)
@@ -1,6 +1,6 @@
 require 'oci8'
 require 'test/unit'
-require './config'
+require File.dirname(__FILE__) + '/config'
 
 class TestMetadata < Test::Unit::TestCase
 

Modified: trunk/ruby-oci8/test/test_object.rb
===================================================================
--- trunk/ruby-oci8/test/test_object.rb	2008-08-05 13:51:30 UTC (rev 276)
+++ trunk/ruby-oci8/test/test_object.rb	2008-08-05 13:53:55 UTC (rev 277)
@@ -1,6 +1,6 @@
 require 'oci8'
 require 'test/unit'
-require './config'
+require File.dirname(__FILE__) + '/config'
 
 class RbTestObj < OCI8::Object::Base
 end

Modified: trunk/ruby-oci8/test/test_oci8.rb
===================================================================
--- trunk/ruby-oci8/test/test_oci8.rb	2008-08-05 13:51:30 UTC (rev 276)
+++ trunk/ruby-oci8/test/test_oci8.rb	2008-08-05 13:53:55 UTC (rev 277)
@@ -1,6 +1,6 @@
 require 'oci8'
 require 'test/unit'
-require './config'
+require File.dirname(__FILE__) + '/config'
 
 class TestOCI8 < Test::Unit::TestCase
 

Modified: trunk/ruby-oci8/test/test_oradate.rb
===================================================================
--- trunk/ruby-oci8/test/test_oradate.rb	2008-08-05 13:51:30 UTC (rev 276)
+++ trunk/ruby-oci8/test/test_oradate.rb	2008-08-05 13:53:55 UTC (rev 277)
@@ -1,7 +1,7 @@
 # Low-level API
 require 'oci8'
 require 'test/unit'
-require './config'
+require File.dirname(__FILE__) + '/config'
 
 class TestOraDate < Test::Unit::TestCase
 

Modified: trunk/ruby-oci8/test/test_oranumber.rb
===================================================================
--- trunk/ruby-oci8/test/test_oranumber.rb	2008-08-05 13:51:30 UTC (rev 276)
+++ trunk/ruby-oci8/test/test_oranumber.rb	2008-08-05 13:53:55 UTC (rev 277)
@@ -1,7 +1,7 @@
 # Low-level API
 require 'oci8'
 require 'test/unit'
-require './config'
+require File.dirname(__FILE__) + '/config'
 require 'yaml'
 
 class TestOraNumber < Test::Unit::TestCase

Modified: trunk/ruby-oci8/test/test_rowid.rb
===================================================================
--- trunk/ruby-oci8/test/test_rowid.rb	2008-08-05 13:51:30 UTC (rev 276)
+++ trunk/ruby-oci8/test/test_rowid.rb	2008-08-05 13:53:55 UTC (rev 277)
@@ -1,6 +1,6 @@
 require 'oci8'
 require 'test/unit'
-require './config'
+require File.dirname(__FILE__) + '/config'
 
 class TestRowid < Test::Unit::TestCase
 




More information about the ruby-oci8-commit mailing list