# |>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: basic_tests.test,v 1.4 1999/10/12 02:01:22 mtariq Exp $

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

test oratcl-1.0 {oralogon} { 
    oralogon $oracleuser/$oraclepw@$connstring 
} {oratcl0}

test oratcl-2.0 {oraopen} {
   oraopen oratcl0
} {oratcl0.0}

test oratcl-3.0 {orasql create table} {
    orasql oratcl0.0 "create table tcl_temp (name varchar2(20), id int)"
} {0}

test oratcl-4.0 {orasql insert into} {
    orasql oratcl0.0 "insert into tcl_temp (name, id) values ('apple', 1)"
} {0}

test oratcl-5.0 {oracommit} {
    oracommit oratcl0.0
} {}

test oratcl-6.0 {orasql select from} {
    orasql oratcl0.0 "select name from tcl_temp where id = 1"
} {0}

test oratcl-7.0 {orasql orafetch} {
    orafetch oratcl0.0
} {apple}

test oratcl-8.0 {oracols} {
    oracols oratcl0.0
} {NAME}

test oratcl-9.0 {drop table} {
   orasql oratcl0.0 "drop table tcl_temp"
} {0}

test oratcl-10.0 {oralogoff} {
  oralogoff oratcl0 
   } {}
::tcltest::cleanupTests

return
