From: Matt S Trout Date: Fri, 5 Apr 2019 00:31:46 +0000 (+0000) Subject: allow controlling SQL::Abstract class for test suite running X-Git-Tag: v2.000000~3^2~281 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=c9383a7bf3e24311349f0f8d2681dfb56f720c8c;p=dbsrgits%2FSQL-Abstract.git allow controlling SQL::Abstract class for test suite running --- diff --git a/lib/SQL/Abstract/Test.pm b/lib/SQL/Abstract/Test.pm index fece0e0..6c7e9cf 100644 --- a/lib/SQL/Abstract/Test.pm +++ b/lib/SQL/Abstract/Test.pm @@ -7,6 +7,13 @@ use Test::Builder; use Test::Deep (); use SQL::Abstract::Tree; +if (my $class = $ENV{SQL_ABSTRACT_TEST_AGAINST}) { + my $mod = join('/', split '::', $class).".pm"; + require $mod; + eval qq{sub SQL::Abstract () { "\Q${class}\E" }; 1} + or die "Failed to create const sub for ${class}: $@"; +} + our @EXPORT_OK = qw( is_same_sql_bind is_same_sql is_same_bind eq_sql_bind eq_sql eq_bind dumper diag_where