3 # Tests for convenience commands in TDBC
5 # Copyright (c) 2009 by Kevin B. Kenny.
10 package require tcltest 2
11 namespace import -force ::tcltest::*
12 tcltest::loadTestedCommands
15 test tdbc-1.1 {tdbc::mapSqlState, wrong args} {*}{
17 list [catch {tdbc::mapSqlState} result] $result
20 -result {1 {wrong # args:*}}
23 test tdbc-1.2 {tdbc::mapSqlState, wrong args} {*}{
25 list [catch {tdbc::mapSqlState 00000 ?} result] $result
28 -result {1 {wrong # args:*}}
31 test tdbc-1.3 {tdbc::mapSqlState, known state} {*}{
33 tdbc::mapSqlState 22012
35 -result {DATA_EXCEPTION}
38 test tdbc-1.4 {tdbc::mapSqlState, known state} {*}{
40 tdbc::mapSqlState *****
42 -result {UNKNOWN_SQLSTATE}