[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
SF.net SVN: ledger-smb: [1251] trunk
- Subject: SF.net SVN: ledger-smb: [1251] trunk
- From: ..hidden..
- Date: Sat, 02 Jun 2007 16:12:01 -0700
Revision: 1251
http://svn.sourceforge.net/ledger-smb/?rev=1251&view=rev
Author: tetragon
Date: 2007-06-02 16:12:01 -0700 (Sat, 02 Jun 2007)
Log Message:
-----------
Template test adjustments
Modified Paths:
--------------
trunk/Build.PL
trunk/Makefile.PL
trunk/t/04-template-handling.t
Added Paths:
-----------
trunk/t/data/04-template.tex
Modified: trunk/Build.PL
===================================================================
--- trunk/Build.PL 2007-06-01 18:52:29 UTC (rev 1250)
+++ trunk/Build.PL 2007-06-02 23:12:01 UTC (rev 1251)
@@ -8,7 +8,7 @@
dist_version => '1.2.99',
license => 'GPL',
requires => {
- 'perl' => '>= 5.8.0',
+ 'perl' => '>= 5.8.1',
'Data::Dumper' => 0,
'Locale::Maketext' => 0,
'Locale::Maketext::Lexicon' => '>= 0.56',
Modified: trunk/Makefile.PL
===================================================================
--- trunk/Makefile.PL 2007-06-01 18:52:29 UTC (rev 1250)
+++ trunk/Makefile.PL 2007-06-02 23:12:01 UTC (rev 1251)
@@ -8,7 +8,7 @@
version '1.2.3';
license 'GPL';
-perl_version '5.8.0';
+perl_version '5.8.1';
requires 'Data::Dumper';
requires 'Locale::Maketext';
Modified: trunk/t/04-template-handling.t
===================================================================
--- trunk/t/04-template-handling.t 2007-06-01 18:52:29 UTC (rev 1250)
+++ trunk/t/04-template-handling.t 2007-06-02 23:12:01 UTC (rev 1251)
@@ -3,8 +3,8 @@
use strict;
use warnings;
-#$ENV{TMPDIR} = 't/var';
-$ENV{TMPDIR} = '/Users/seneca/sourceforge-svn/ledger-smb/trunk/t/var';
+# Absolute directory name required to not trip up Template::Latex
+$ENV{TMPDIR} = "$ENV{PWD}/t/var";
use Test::More 'no_plan';
use Test::Trap qw(trap $trap);
@@ -226,6 +226,10 @@
is($template->render({'login' => 'foo\&bar'}), 't/var/04-template-output.pdf',
'Template, render: Simple PDF template, default filename');
ok(-e 't/var/04-template-output.pdf', 'Template, render (PDF): File created');
+is(unlink('t/var/04-template-output.pdf'), 1,
+ 'Template, render (PDF): removing testfile');
+ok(!-e 't/var/04-template-output.pdf',
+ 'Template, render (PDF): testfile removed');
$template = undef;
$template = new LedgerSMB::Template('user' => $myconfig, 'format' => 'PS',
@@ -239,6 +243,10 @@
is($template->render({'login' => 'foo\&bar'}), 't/var/04-template-output.ps',
'Template, render: Simple Postscript template, default filename');
ok(-e 't/var/04-template-output.ps', 'Template, render (PS): File created');
+is(unlink('t/var/04-template-output.ps'), 1,
+ 'Template, render (PS): removing testfile');
+ok(!-e 't/var/04-template-output.ps',
+ 'Template, render (PS): testfile removed');
##open($FH, '<', 't/var/04-template-output.html');
..hidden.. = <$FH>;
##close($FH);
Added: trunk/t/data/04-template.tex
===================================================================
--- trunk/t/data/04-template.tex (rev 0)
+++ trunk/t/data/04-template.tex 2007-06-02 23:12:01 UTC (rev 1251)
@@ -0,0 +1,20 @@
+<?lsmb FILTER latex -?>
+\documentclass{scrartcl}
+\usepackage[utf8]{inputenc}
+\usepackage{tabularx}
+\usepackage[letterpaper,top=2cm,bottom=1.5cm,left=1.1cm,right=1.5cm]{geometry}
+\usepackage{graphicx}
+
+\begin{document}
+
+\pagestyle{myheadings}
+\thispagestyle{empty}
+
+\fontfamily{cmss}\fontsize{10pt}{12pt}\selectfont
+
+I am a template.
+
+Look at me <?lsmb login ?>.
+
+\end{document}
+<?lsmb END ?>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.