File: 16no_sideeffects.t

package info (click to toggle)
libsql-abstract-perl 2.000001-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 744 kB
  • sloc: perl: 3,443; makefile: 8
file content (20 lines) | stat: -rw-r--r-- 453 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
use strict;
use warnings;

use Test::More;
use SQL::Abstract::Tree;

ok my $placeholders = [100,'xxx'];
ok my $sqlat = SQL::Abstract::Tree->new({profile=>'html'});
ok my $out = $sqlat->format('SELECT * FROM bar WHERE x = ?', $placeholders);

is scalar(@$placeholders), 2,
  'correct number of placeholders';

is $placeholders->[0], 100,
  'did not mess up a placeholder';

is $placeholders->[1], 'xxx',
  'did not mess up a placeholder';

done_testing;