diff --git a/test/output.py b/test/output.py index 41bf4e22..bb6fa0d7 100644 --- a/test/output.py +++ b/test/output.py @@ -51,8 +51,6 @@ def TestFilename(line): currentPos = 0 while True: currentPos = currentPos - 1 - if currentPos == 0: - break line[currentPos] if line[currentPos] == terminateChar: break diff --git a/test/sqlsrv/sqlsrv_fetch_complex_transactions.phpt b/test/sqlsrv/sqlsrv_fetch_complex_transactions.phpt index d589ba84..b4c6c556 100644 --- a/test/sqlsrv/sqlsrv_fetch_complex_transactions.phpt +++ b/test/sqlsrv/sqlsrv_fetch_complex_transactions.phpt @@ -4,61 +4,64 @@ Populate different test tables with binary fields using empty stream data as inp $database, 'UID'=>$username, 'PWD'=>$password); $conn = sqlsrv_connect($serverName, $connectionInfo); if( !$conn ) { FatalError("Could not connect.\n"); } - - ComplexTransaction($conn); - sqlsrv_close($conn); + $conn2 = sqlsrv_connect($serverName, $connectionInfo); + if( !$conn2 ) { FatalError("Could not connect.\n"); } + + ComplexTransaction($conn, $conn2); + + sqlsrv_close($conn2); // $conn should have been closed } catch (Exception $e) { @@ -121,6 +134,17 @@ Repro(); --EXPECT--  ...Starting 'sqlsrv_fetch_complex_transactions' test... +Number of rows fetched: 10 +Committed deleting 3 rows +Number of rows fetched: 7 +Rolled back +Number of rows fetched: 7 +Committed deleting 3 rows +Number of rows fetched: 4 +Rolled back +Number of rows fetched: 4 +Deletion aborted +Number of rows fetched: 4 Done ...Test 'sqlsrv_fetch_complex_transactions' completed successfully. \ No newline at end of file diff --git a/test/sqlsrv/sqlsrv_streams_null_binary.phpt b/test/sqlsrv/sqlsrv_streams_null_binary.phpt new file mode 100644 index 00000000..d8118d0f --- /dev/null +++ b/test/sqlsrv/sqlsrv_streams_null_binary.phpt @@ -0,0 +1,143 @@ +--TEST-- +Populate different test tables with binary fields using null stream data as inputs. +--FILE-- +$database, 'UID'=>$username, 'PWD'=>$password); + $conn = sqlsrv_connect($serverName, $connectionInfo); + if( !$conn ) { FatalError("Could not connect.\n"); } + + NullStream_Bin2String($conn); + NullStreamPrep_Bin2String($conn); + + sqlsrv_close($conn); + } + catch (Exception $e) + { + echo $e->getMessage(); + } + echo "\nDone\n"; + EndTest("sqlsrv_streams_null_binary"); +} + +Repro(); + +?> +--EXPECT-- + +...Starting 'sqlsrv_streams_null_binary' test... +NULL +NULL +NULL +NULL +NULL +NULL + +Done +...Test 'sqlsrv_streams_null_binary' completed successfully. \ No newline at end of file