Stop mangling sql on the way out of the limit dialects
[dbsrgits/DBIx-Class.git] / t / sqlmaker / limit_dialects / rno.t
index dc598c0..4b96a65 100644 (file)
@@ -71,4 +71,20 @@ is_same_sql_bind(
   [ [ 'source', 'Library' ] ],
 );
 
+{
+  my $rs = $schema->resultset('Artist')->search({}, {
+    columns => 'name',
+    offset => 1,
+    order_by => 'name',
+  });
+  local $rs->result_source->{name} = "weird \n newline/multi \t \t space containing \n table";
+
+  like (
+    ${$rs->as_query}->[0],
+    qr| weird \s \n \s newline/multi \s \t \s \t \s space \s containing \s \n \s table|x,
+    'Newlines/spaces preserved in final sql',
+  );
+}
+
+
 done_testing;