Commit | Line | Data |
c4794c97 |
1 | use strict; |
2 | use warnings; |
3 | |
4 | use Test::More; |
5 | use SQL::Abstract::Tree; |
6 | |
7 | ok my $placeholders = [100,'xxx']; |
8 | ok my $sqlat = SQL::Abstract::Tree->new({profile=>'html'}); |
9 | ok my $out = $sqlat->format('SELECT * FROM bar WHERE x = ?', $placeholders); |
10 | |
4ca99007 |
11 | is scalar(@$placeholders), 2, |
12 | 'correct number of placeholders'; |
13 | |
c4794c97 |
14 | is $placeholders->[0], 100, |
15 | 'did not mess up a placeholder'; |
16 | |
4ca99007 |
17 | is $placeholders->[1], 'xxx', |
18 | 'did not mess up a placeholder'; |
19 | |
c4794c97 |
20 | done_testing; |