summaryrefslogtreecommitdiff
blob: f26837f548a8f007e298bb77f4bea53b4ac44266 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
From 497224cad8b6469913c61ee856228bc1d0280980 Mon Sep 17 00:00:00 2001
From: Pali <pali@cpan.org>
Date: Mon, 17 Apr 2017 21:38:58 +0200
Subject: [PATCH] Fix tests on Perl On 5.25.10 or greater with
 -Ddefault_inc_excludes_dot

Some tests do not include dot in %INC and fails with error:
Can't locate t/lib.pl in @INC

Fixes: https://rt.cpan.org/Public/Bug/Display.html?id=120709
---
 t/40server_prepare_crash.t             | 3 ++-
 t/rt25389-bin-case.t                   | 3 ++-
 t/rt50304-column_info_parentheses.t    | 3 ++-
 t/rt61849-bind-param-buffer-overflow.t | 3 ++-
 t/rt75353-innodb-lock-timeout.t        | 3 ++-
 t/rt83494-quotes-comments.t            | 3 ++-
 11 files changed, 22 insertions(+), 11 deletions(-)

diff --git a/t/40server_prepare_crash.t b/t/40server_prepare_crash.t
index e3777b9..d04eb9c 100644
--- a/t/40server_prepare_crash.t
+++ b/t/40server_prepare_crash.t
@@ -5,7 +5,8 @@ use Test::More;
 use DBI;
 
 use vars qw($test_dsn $test_user $test_password);
-require "t/lib.pl";
+use lib 't', '.';
+require "lib.pl";
 
 my $dbh = DbiTestConnect($test_dsn, $test_user, $test_password, { PrintError => 1, RaiseError => 1, AutoCommit => 0, mysql_server_prepare => 1, mysql_server_prepare_disable_fallback => 1 });
 plan skip_all => "You must have MySQL version 4.1.3 and greater for this test to run" if $dbh->{mysql_clientversion} < 40103 or $dbh->{mysql_serverversion} < 40103;
diff --git a/t/rt25389-bin-case.t b/t/rt25389-bin-case.t
index cbda8b7..3aee41b 100644
--- a/t/rt25389-bin-case.t
+++ b/t/rt25389-bin-case.t
@@ -4,7 +4,8 @@ use warnings;
 use DBI;
 
 use vars qw($test_dsn $test_user $test_password);
-require "t/lib.pl";
+use lib 't', '.';
+require "lib.pl";
 
 use Test::More;
 
diff --git a/t/rt50304-column_info_parentheses.t b/t/rt50304-column_info_parentheses.t
index 76f9eff..6c3aac5 100644
--- a/t/rt50304-column_info_parentheses.t
+++ b/t/rt50304-column_info_parentheses.t
@@ -4,7 +4,8 @@ use warnings;
 use DBI;
 
 use vars qw($test_dsn $test_user $test_password $state);
-require "t/lib.pl";
+use lib 't', '.';
+require "lib.pl";
 
 use Test::More;
 
diff --git a/t/rt61849-bind-param-buffer-overflow.t b/t/rt61849-bind-param-buffer-overflow.t
index 82baf2f..a3c75de 100644
--- a/t/rt61849-bind-param-buffer-overflow.t
+++ b/t/rt61849-bind-param-buffer-overflow.t
@@ -5,7 +5,8 @@ use Test::More;
 use DBI;
 
 use vars qw($test_dsn $test_user $test_password);
-require "t/lib.pl";
+use lib 't', '.';
+require "lib.pl";
 
 my $INSECURE_VALUE_FROM_USER = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx";
 
diff --git a/t/rt75353-innodb-lock-timeout.t b/t/rt75353-innodb-lock-timeout.t
index a1f437d..95694db 100644
--- a/t/rt75353-innodb-lock-timeout.t
+++ b/t/rt75353-innodb-lock-timeout.t
@@ -5,7 +5,8 @@ use Test::More;
 use DBI;
 
 use vars qw($test_dsn $test_user $test_password);
-require "t/lib.pl";
+use lib 't', '.';
+require "lib.pl";
 
 my $dbh1 = DbiTestConnect($test_dsn, $test_user, $test_password, { RaiseError => 1, AutoCommit => 0 });
 
diff --git a/t/rt83494-quotes-comments.t b/t/rt83494-quotes-comments.t
index c48b0b9..83919f2 100644
--- a/t/rt83494-quotes-comments.t
+++ b/t/rt83494-quotes-comments.t
@@ -9,7 +9,8 @@ use DBI;
 use Test::More;
 
 use vars qw($test_dsn $test_user $test_password $state);
-require "t/lib.pl";
+use lib 't', '.';
+require "lib.pl";
 
 my $dbh = DbiTestConnect($test_dsn, $test_user, $test_password,
                       { RaiseError => 1, PrintError => 0, AutoCommit => 0 });