From 5b2ec69c37592bf8d4cc38e95e71f1d58e575807 Mon Sep 17 00:00:00 2001 From: Jenny Tam Date: Mon, 21 Aug 2017 12:59:17 -0700 Subject: [PATCH 1/2] Added a new sqlsrv test to test the string boundaries --- test/functional/sqlsrv/test_max_length.phpt | 113 ++++++++++++++++++++ 1 file changed, 113 insertions(+) create mode 100644 test/functional/sqlsrv/test_max_length.phpt diff --git a/test/functional/sqlsrv/test_max_length.phpt b/test/functional/sqlsrv/test_max_length.phpt new file mode 100644 index 00000000..20abcf67 --- /dev/null +++ b/test/functional/sqlsrv/test_max_length.phpt @@ -0,0 +1,113 @@ +--TEST-- +Maximum length outputs from stored procs for string types (nvarchar, varchar, and varbinary) +--SKIPIF-- + +--FILE-- + +--EXPECT-- +4000 +AA +8000 +AA +8000 +AB From 2713ab12abd48801b1f713171e84c1a3482478aa Mon Sep 17 00:00:00 2001 From: Jenny Tam Date: Mon, 21 Aug 2017 13:02:46 -0700 Subject: [PATCH 2/2] Fixed minor issues --- test/functional/sqlsrv/test_max_length.phpt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/functional/sqlsrv/test_max_length.phpt b/test/functional/sqlsrv/test_max_length.phpt index 20abcf67..b52c2970 100644 --- a/test/functional/sqlsrv/test_max_length.phpt +++ b/test/functional/sqlsrv/test_max_length.phpt @@ -7,7 +7,7 @@ Maximum length outputs from stored procs for string types (nvarchar, varchar, an set_time_limit(0); -$inValue1 = str_repeat( "A", 3999 ); +$inValue1 = str_repeat( 'A', 3999 ); $outValue1 = "TEST"; @@ -101,7 +101,7 @@ print_r( strlen( $outValue1 )); echo "\n"; print_r( substr( $outValue1, -2, 2 )); -sqlsrv_close( $conn ); // True +sqlsrv_close( $conn ); ?> --EXPECT--