From d25559163373a6c88223d12743741364a22638c3 Mon Sep 17 00:00:00 2001 From: Jenny Tam Date: Thu, 10 Jun 2021 17:59:08 -0700 Subject: [PATCH] Fixed build script and failing tests (#1268) --- buildscripts/buildtools.py | 2 +- .../pdo_sqlsrv/pdo_1261_test_ascii_utf8.phpt | 3 +-- .../pdo_sqlsrv/pdo_test_TVP_bind_binary_values.phpt | 11 ++++++++++- .../sqlsrv/sqlsrv_test_TVP_query_binary_fields.phpt | 11 ++++++++++- test/functional/sqlsrv/srv_1261_test_ascii_utf8.phpt | 3 +-- 5 files changed, 23 insertions(+), 7 deletions(-) diff --git a/buildscripts/buildtools.py b/buildscripts/buildtools.py index ad555e2c..58177854 100644 --- a/buildscripts/buildtools.py +++ b/buildscripts/buildtools.py @@ -99,7 +99,7 @@ class BuildUtil(object): if self.vc == '': VC = 'vc15' version = self.version_label() - if version == '80': # Compiler version for PHP 8.0 or above + if version[0] == '8': # Compiler version for PHP 8.0 or above VC = 'vs16' self.vc = VC print('Compiler: ' + self.vc) diff --git a/test/functional/pdo_sqlsrv/pdo_1261_test_ascii_utf8.phpt b/test/functional/pdo_sqlsrv/pdo_1261_test_ascii_utf8.phpt index 4e8dcc69..4ab0afe5 100644 --- a/test/functional/pdo_sqlsrv/pdo_1261_test_ascii_utf8.phpt +++ b/test/functional/pdo_sqlsrv/pdo_1261_test_ascii_utf8.phpt @@ -24,8 +24,7 @@ try { # SQLSRV_ATTR_ENCODING must be set to SQLSRV_ENCODING_SYSTEM (works with PDO::SQLSRV_ENCODING_UTF8) # COLLATE must not be %UTF8% (e.g. Latin1_General_100_CI_AS_SC_UTF8 works) - $sql = "DROP TABLE IF EXISTS #tmpTest; - SET NOCOUNT ON; + $sql = "SET NOCOUNT ON; DECLARE @val VARCHAR(8000) = REPLICATE('a', 2045) + 'ñ'; CREATE TABLE #tmpTest (testCol VARCHAR(MAX) COLLATE SQL_Latin1_General_CP1_CI_AS); INSERT INTO #tmpTest (testCol) VALUES (@val); diff --git a/test/functional/pdo_sqlsrv/pdo_test_TVP_bind_binary_values.phpt b/test/functional/pdo_sqlsrv/pdo_test_TVP_bind_binary_values.phpt index 9f235fde..ed951194 100644 --- a/test/functional/pdo_sqlsrv/pdo_test_TVP_bind_binary_values.phpt +++ b/test/functional/pdo_sqlsrv/pdo_test_TVP_bind_binary_values.phpt @@ -5,7 +5,16 @@ Test Table-valued parameter using bindValue() instead of bindParam() with random --ENV-- PHPT_EXEC=true --SKIPIF-- - + --FILE-- + --FILE-- SQLSRV_ENC_CHAR)); # 'CharacterSet' connInfo must be set to SQLSRV_ENC_CHAR (works with UTF-8) # COLLATE must not be %UTF8% (e.g. Latin1_General_100_CI_AS_SC_UTF8 works) -$sql = "DROP TABLE IF EXISTS #tmpTest; - SET NOCOUNT ON; +$sql = "SET NOCOUNT ON; DECLARE @val VARCHAR(8000) = REPLICATE('a', 2045) + 'ñ'; CREATE TABLE #tmpTest (testCol VARCHAR(MAX) COLLATE SQL_Latin1_General_CP1_CI_AS); INSERT INTO #tmpTest (testCol) VALUES (@val);