# This file contains a collection of tests for one or more of the Tcl
# built-in commands.  Sourcing this file into Tcl runs the tests and
# generates output for errors.  No output means no errors were found.
#
# This file tests the Oratcl command orabindexec using unicode string as a 
# value to a bind variable.
# The test first creates a temporary table with column data that has unicode
# data.
# Then orabindexec is called with that unicode data as a bind value.
#
# Copyright (c) 1998-1999 by Scriptics Corporation.
# All rights reserved.
#
# RCS: @(#) $Id: obindex_i18n.test,v 1.4 1999/10/12 02:01:22 mtariq Exp $


source [file  join [pwd] [file dirname [info script]] defs.tcl]

test orabindex-1.0 {tests oratcl orabindex cmd} {
     set handle [oralogon $oracleuser/$oraclepw@$connstring]
     set cursor [oraopen $handle]
     set unistr \u00c3\u00a9
     set str "create table test_obindexi18n (ename varchar2(15), id int)"
     orasql $cursor $str
     set str "insert into test_obindexi18n (ename, id) values ('$unistr', 100)"
     orasql $cursor $str
     orasql $cursor "select id from test_obindexi18n where ename = :name" -parseonly
     orabindexec $cursor :name $unistr
     set result [orafetch $cursor]
     orasql $cursor "drop table test_obindexi18n"
     oralogoff $handle
     set result $result
} {100}

::tcltest::cleanupTests

return
