added test for the html profile destroyed placeholder problem
John Napiorkowski [Wed, 20 Oct 2010 17:49:40 +0000 (17:49 +0000)]
t/16no_sideeffects.t [new file with mode: 0644]

diff --git a/t/16no_sideeffects.t b/t/16no_sideeffects.t
new file mode 100644 (file)
index 0000000..5b145d4
--- /dev/null
@@ -0,0 +1,14 @@
+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 $placeholders->[0], 100,
+  'did not mess up a placeholder';
+
+done_testing;