diff options
author | Ard Biesheuvel <abies@php.net> | 2004-02-15 18:34:47 +0000 |
---|---|---|
committer | Ard Biesheuvel <abies@php.net> | 2004-02-15 18:34:47 +0000 |
commit | 595d6a2d8406436beb6e8191e746bebb9926bab9 (patch) | |
tree | a4bf222c97657deacb886c602fee65019a433d27 /ext/interbase/tests/003.phpt | |
parent | 47c49ee013dbf44796a91ef3d50fba1c2ca60efc (diff) | |
download | php-git-595d6a2d8406436beb6e8191e746bebb9926bab9.tar.gz |
Reintroduce param NULL testing (see bug #26777)
Diffstat (limited to 'ext/interbase/tests/003.phpt')
-rw-r--r-- | ext/interbase/tests/003.phpt | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/ext/interbase/tests/003.phpt b/ext/interbase/tests/003.phpt index 2d105b1866..d3e60461e5 100644 --- a/ext/interbase/tests/003.phpt +++ b/ext/interbase/tests/003.phpt @@ -12,7 +12,7 @@ InterBase: misc sql types (may take a while) ibase_query( "create table test3 ( - iter integer, + iter integer not null, v_char char(1000), v_date timestamp, v_decimal4_2 decimal(4,2), @@ -29,6 +29,9 @@ InterBase: misc sql types (may take a while) )"); ibase_commit(); + /* should fail, but gracefully */ + @ibase_query("insert into test3 (iter) values (?)", null); + /* if timefmt is not supported, suppress error here */ @ibase_timefmt("%m/%d/%Y %H:%M:%S"); @@ -41,7 +44,7 @@ InterBase: misc sql types (may take a while) $v_decimal7_2 = rand_number(7,2); $v_decimal7_0 = rand_number(7,0); $v_numeric15_15 = rand_number(15,15); - $v_numeric15_0 = rand_number(15,0); + $v_numeric15_0 = $iter ? rand_number(15,0) : 0; $v_double = rand_number(18); $v_float = rand_number(7); $v_integer = rand_number(9,0); @@ -88,7 +91,7 @@ InterBase: misc sql types (may take a while) echo " in: $v_numeric15_15\n"; echo " out: $row->V_NUMERIC15_15\n"; } - if($row->V_NUMERIC15_0 != $v_numeric15_0){ + if($row->V_NUMERIC15_0 != (string)$v_numeric15_0){ echo " NUMERIC15_0 fail\n"; echo " in: $v_numeric15_0\n"; echo " out: $row->V_NUMERIC15_0\n"; |