# |>Description.<|
#
# 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.
#
# Copyright (c) 1998-1999 by Scriptics Corporation.
# All rights reserved.
#
# RCS: @(#) $Id: oraplexec_i18n.test,v 1.4 1999/10/12 02:01:23 mtariq Exp $

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

set pl_proc {
  create procedure total_salary
    (job_type in varchar2,
     tot_sal out number)
  as 
    tot_fixed NUMBER;
       
   begin
    select sum(sal) into tot_fixed
     from test_int
     where job = job_type;
   tot_sal := tot_fixed;
   end;
}

set anon_pl {
   begin
    total_salary (:type, :total);
   end;
}
set x \u00c3\u00a9
test oraplex-int {test of i18n on oraplexec} {
    oralogon $oracleuser/$oraclepw@$connstring
    oraopen oratcl0
    orasql oratcl0.0 "create table test_int (name varchar2(20), sal int, job varchar2(15))"
    orasql oratcl0.0 "insert into test_int (name, sal, job) values ('Joe', 100,'$x')"
    orasql oratcl0.0 "insert into test_int (name, sal, job) values ('Joe', 200,
    '$x')"
    orasql oratcl0.0 "insert into test_int (name, sal, job) values ('Joe', 300,
    '$x')"
    oraplexec oratcl0.0 $pl_proc
    oraplexec oratcl0.0 $anon_pl :type $x :total 0
} "$x 600"

orasql oratcl0.0 "drop table test_int"
orasql oratcl0.0 "drop procedure  total_salary"
oralogoff oratcl0

::tcltest::cleanupTests
return



