[Catalyst-commits] r10689 - in trunk/Catalyst-View-XSLT: . lib/Catalyst/Helper/View lib/Catalyst/View lib/Catalyst/View/XSLT/XML t t/lib t/lib/TestApp/root

janus at dev.catalyst.perl.org janus at dev.catalyst.perl.org
Sat Jun 27 12:38:40 GMT 2009


Author: janus
Date: 2009-06-27 12:38:40 +0000 (Sat, 27 Jun 2009)
New Revision: 10689

Added:
   trunk/Catalyst-View-XSLT/t/16_template_render_filename.t
   trunk/Catalyst-View-XSLT/t/lib/TestApp/root/testRenderFilename.xsl
Modified:
   trunk/Catalyst-View-XSLT/Changes
   trunk/Catalyst-View-XSLT/MANIFEST
   trunk/Catalyst-View-XSLT/lib/Catalyst/Helper/View/XSLT.pm
   trunk/Catalyst-View-XSLT/lib/Catalyst/View/XSLT.pm
   trunk/Catalyst-View-XSLT/lib/Catalyst/View/XSLT/XML/LibXSLT.pm
   trunk/Catalyst-View-XSLT/t/lib/TestApp.pm
   trunk/Catalyst-View-XSLT/t/lib/TestApp/root/testRender.xsl
Log:
add another test, update changes file und bump version to 0.08

Modified: trunk/Catalyst-View-XSLT/Changes
===================================================================
--- trunk/Catalyst-View-XSLT/Changes	2009-06-27 03:57:51 UTC (rev 10688)
+++ trunk/Catalyst-View-XSLT/Changes	2009-06-27 12:38:40 UTC (rev 10689)
@@ -1,3 +1,6 @@
+0.08  Mon Apr  6 10:07:55 2009
+	- add test to check direct calls to render() work
+	- check for object references to prevent isa() on undefined values (RT#44783 from PEPL)
 0.07  Mon Mar  2 18:19:27 2009
 	- put $VERSIONs back to all files (RT#43774)
 	- add support to accept strings, filehandles and objects

Modified: trunk/Catalyst-View-XSLT/MANIFEST
===================================================================
--- trunk/Catalyst-View-XSLT/MANIFEST	2009-06-27 03:57:51 UTC (rev 10688)
+++ trunk/Catalyst-View-XSLT/MANIFEST	2009-06-27 12:38:40 UTC (rev 10689)
@@ -22,6 +22,7 @@
 t/13_xml_libxml_document.t
 t/14_xml_path_class.t
 t/15_template_import.t
+t/16_template_render_filename.t
 t/lib/TestApp.pm
 t/lib/TestApp/root/additional/testIncludePath.xsl
 t/lib/TestApp/root/testImport.xsl
@@ -29,4 +30,5 @@
 t/lib/TestApp/root/testParams.xsl
 t/lib/TestApp/root/testRegisterFunction.xsl
 t/lib/TestApp/root/testRender.xsl
+t/lib/TestApp/root/testRenderFilename.xsl
 t/lib/TestApp/View/XSLT/XML/LibXSLT.pm

Modified: trunk/Catalyst-View-XSLT/lib/Catalyst/Helper/View/XSLT.pm
===================================================================
--- trunk/Catalyst-View-XSLT/lib/Catalyst/Helper/View/XSLT.pm	2009-06-27 03:57:51 UTC (rev 10688)
+++ trunk/Catalyst-View-XSLT/lib/Catalyst/Helper/View/XSLT.pm	2009-06-27 12:38:40 UTC (rev 10689)
@@ -3,7 +3,7 @@
 use strict;
 use warnings;
 
-our $VERSION = '0.07';
+our $VERSION = '0.08';
 
 =head1 NAME
 

Modified: trunk/Catalyst-View-XSLT/lib/Catalyst/View/XSLT/XML/LibXSLT.pm
===================================================================
--- trunk/Catalyst-View-XSLT/lib/Catalyst/View/XSLT/XML/LibXSLT.pm	2009-06-27 03:57:51 UTC (rev 10688)
+++ trunk/Catalyst-View-XSLT/lib/Catalyst/View/XSLT/XML/LibXSLT.pm	2009-06-27 12:38:40 UTC (rev 10689)
@@ -3,7 +3,7 @@
 use strict;
 use warnings;
 
-our $VERSION = '0.07';
+our $VERSION = '0.08';
 
 =head1 NAME
 

Modified: trunk/Catalyst-View-XSLT/lib/Catalyst/View/XSLT.pm
===================================================================
--- trunk/Catalyst-View-XSLT/lib/Catalyst/View/XSLT.pm	2009-06-27 03:57:51 UTC (rev 10688)
+++ trunk/Catalyst-View-XSLT/lib/Catalyst/View/XSLT.pm	2009-06-27 12:38:40 UTC (rev 10689)
@@ -7,7 +7,7 @@
 use Data::Dumper;
 use File::Spec;
 
-our $VERSION = '0.07';
+our $VERSION = '0.08';
 
 # check if this is a MS Windows 
 my $isMS = $^O eq 'MSWin32';

Added: trunk/Catalyst-View-XSLT/t/16_template_render_filename.t
===================================================================
--- trunk/Catalyst-View-XSLT/t/16_template_render_filename.t	                        (rev 0)
+++ trunk/Catalyst-View-XSLT/t/16_template_render_filename.t	2009-06-27 12:38:40 UTC (rev 10689)
@@ -0,0 +1,21 @@
+use strict;
+use warnings;
+use Test::More tests => 5;
+
+use FindBin;
+use lib "$FindBin::Bin/../lib";
+use lib "$FindBin::Bin/lib";
+
+use_ok('Catalyst::Test', 'TestApp');
+
+my $view = 'XML::LibXSLT';
+
+my $response;
+ok(($response = request("/test_template_render_filename?view=$view&template=testRenderFilename.xsl"))->is_success, 'request ok');
+is($response->content, '<dummy-root>' . TestApp->config->{default_message} . "</dummy-root>\n", 'message ok');
+
+my $message = scalar localtime;
+my $xml = "<dummy-root>$message</dummy-root>\n";
+ok(($response = request("/test_template_render_filename?view=$view&message=$message&template=testRenderFilename.xsl"))->is_success, 'request with message ok');
+is($response->content, $xml, 'message ok');
+

Modified: trunk/Catalyst-View-XSLT/t/lib/TestApp/root/testRender.xsl
===================================================================
--- trunk/Catalyst-View-XSLT/t/lib/TestApp/root/testRender.xsl	2009-06-27 03:57:51 UTC (rev 10688)
+++ trunk/Catalyst-View-XSLT/t/lib/TestApp/root/testRender.xsl	2009-06-27 12:38:40 UTC (rev 10689)
@@ -1,3 +1,4 @@
+<?xml version="1.0"?>
 <xsl:stylesheet 
 	xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 
 	version="1.0">

Added: trunk/Catalyst-View-XSLT/t/lib/TestApp/root/testRenderFilename.xsl
===================================================================
--- trunk/Catalyst-View-XSLT/t/lib/TestApp/root/testRenderFilename.xsl	                        (rev 0)
+++ trunk/Catalyst-View-XSLT/t/lib/TestApp/root/testRenderFilename.xsl	2009-06-27 12:38:40 UTC (rev 10689)
@@ -0,0 +1,12 @@
+<?xml version="1.0"?>
+<xsl:stylesheet 
+	xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 
+	version="1.0">
+
+	<xsl:output method="xml" omit-xml-declaration="yes"/>
+
+	<xsl:template match="/">
+			<xsl:copy-of select="."/>
+	</xsl:template>
+
+</xsl:stylesheet>

Modified: trunk/Catalyst-View-XSLT/t/lib/TestApp.pm
===================================================================
--- trunk/Catalyst-View-XSLT/t/lib/TestApp.pm	2009-06-27 03:57:51 UTC (rev 10688)
+++ trunk/Catalyst-View-XSLT/t/lib/TestApp.pm	2009-06-27 12:38:40 UTC (rev 10689)
@@ -189,7 +189,20 @@
     $c->stash->{template} = $template;
 }
 
+sub test_template_render_filename : Local {
+    my ($self, $c) = @_;
 
+    my $message = $c->request->param('message') || $c->config->{default_message};
+
+    my $template = $c->req->param('template');
+
+    my $out = $c->view('XSLT::XML::LibXSLT')->render($c, $template, {xml => "<dummy-root>$message</dummy-root>"});
+
+    $c->stash->{template} = $template;
+
+    $c->stash->{xml} = $out;
+}
+
 sub end : Private {
     my ($self, $c) = @_;
 




More information about the Catalyst-commits mailing list