mirror of
https://github.com/php/pecl-database-ibm_db2.git
synced 2026-03-23 23:02:16 +01:00
Mostly involved finding resources relative to the script directory instead of from the current directory, which make test sets as the source directory. Instead of writing a file and then reading it back in to compare, just build up a string in memory and compare them. Connecting to a missing db alias returns an empty SQLSTATE. I'm not sure if/when that changed, but I've adjusted the code to handle either case. Finally, escape.dat was missing a \r in the file.
23 lines
355 B
PHP
23 lines
355 B
PHP
--TEST--
|
|
IBM-DB2: db2_conn_errormsg() - wrong database alias
|
|
--SKIPIF--
|
|
<?php require_once('skipif.inc'); ?>
|
|
--FILE--
|
|
<?php
|
|
|
|
require_once('connection.inc');
|
|
|
|
$conn = @db2_connect("x", $user, $password);
|
|
|
|
if ($conn) {
|
|
echo "??? No way.\n";
|
|
}
|
|
else {
|
|
$err = db2_conn_errormsg();
|
|
echo $err."\n";
|
|
}
|
|
|
|
?>
|
|
--EXPECTF--
|
|
[IBM][CLI Driver] %s SQLCODE=-%d
|