File: rt_099455.t

package info (click to toggle)
libsql-abstract-more-perl 1.44-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 264 kB
  • sloc: perl: 1,039; makefile: 2
file content (24 lines) | stat: -rw-r--r-- 555 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
use strict;
use warnings;
use Test::More;
use Test::Exception;

use SQL::Abstract::More;
use SQL::Abstract::Test import => ['is_same_sql_bind'];

# GOAL : spaces before the column spec or after the alias name will be ignored

plan tests => 1;

my $sqla = SQL::Abstract::More->new();

my ($sql,@bind) = $sqla->select(
  -from    => 'foo',
  -columns => q[ concat_ws( ' ', t2.first_name,t2.last_name )|assigned_by_long ],
);

is_same_sql_bind (
  $sql, \@bind,
  q[SELECT concat_ws( ' ', t2.first_name,t2.last_name ) AS assigned_by_long FROM foo],
  [],
);