[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
SF.net SVN: ledger-smb:[3883] trunk
- Subject: SF.net SVN: ledger-smb:[3883] trunk
- From: ..hidden..
- Date: Tue, 18 Oct 2011 05:54:39 +0000
Revision: 3883
http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=3883&view=rev
Author: einhverfr
Date: 2011-10-18 05:54:39 +0000 (Tue, 18 Oct 2011)
Log Message:
-----------
Merging from branches/1.3
Modified Paths:
--------------
trunk/Changelog
trunk/t/01-load.t
trunk/t/04-template-handling.t
Property Changed:
----------------
trunk/
trunk/LedgerSMB/Scripts/employee.pm
trunk/sql/upgrade/1.2-1.3-manual.sql
Property changes on: trunk
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/1.3:3711-3880
+ /branches/1.3:3711-3882
Modified: trunk/Changelog
===================================================================
--- trunk/Changelog 2011-10-18 05:51:57 UTC (rev 3882)
+++ trunk/Changelog 2011-10-18 05:54:39 UTC (rev 3883)
@@ -10,8 +10,9 @@
Supported Presently
Changelog for LedgerSMB 1.3.2
-* Fixed a few files where suExec fixes were not applied
-* Fixed erroneous buttons marked "Save and Post" showing up
+* Fixed a few files where suExec fixes were not applied (Chris T)
+* Fixed erroneous buttons marked "Save and Post" showing up (Chris T)
+* Corrected test cases so they do not fail w/o optional LaTeX mods (Chris T)
Changelog for LedgerSMB 1.3.1
* Language selection for invoice templates fixed (Chris T)
Property changes on: trunk/LedgerSMB/Scripts/employee.pm
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/1.3/LedgerSMB/Scripts/employee.pm:3712-3880
/branches/1.3/scripts/employee.pl:3842-3843
+ /branches/1.3/LedgerSMB/Scripts/employee.pm:3712-3882
/branches/1.3/scripts/employee.pl:3842-3843
Property changes on: trunk/sql/upgrade/1.2-1.3-manual.sql
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/1.3/sql/upgrade/1.2-1.3-manual.sql:3712-3880
/branches/1.3/sql/upgrade/1.2-1.3.sql:3711-3851
/trunk/sql/upgrade/1.2-1.3.sql:858-3710
+ /branches/1.3/sql/upgrade/1.2-1.3-manual.sql:3712-3882
/branches/1.3/sql/upgrade/1.2-1.3.sql:3711-3851
/trunk/sql/upgrade/1.2-1.3.sql:858-3710
Modified: trunk/t/01-load.t
===================================================================
--- trunk/t/01-load.t 2011-10-18 05:51:57 UTC (rev 3882)
+++ trunk/t/01-load.t 2011-10-18 05:54:39 UTC (rev 3883)
@@ -56,8 +56,11 @@
use_ok('LedgerSMB::DBObject::Asset_Report');
use_ok('LedgerSMB::DBObject::Asset_Class');
SKIP: {
- eval{ require Template::Plugin::Latex};
- skip 'Template::Plugin::Latex not installed', 1 if @_;
+ eval{ require Template::Plugin::Latex} ||
+ skip 'Template::Plugin::Latex not installed';
+ eval{ require Template::Latex} ||
+ skip 'Template::Latex not installed';
+
use_ok('LedgerSMB::Template::LaTeX');
}
use_ok('LedgerSMB::Template::TXT');
Modified: trunk/t/04-template-handling.t
===================================================================
--- trunk/t/04-template-handling.t 2011-10-18 05:51:57 UTC (rev 3882)
+++ trunk/t/04-template-handling.t 2011-10-18 05:54:39 UTC (rev 3883)
@@ -20,7 +20,11 @@
use LedgerSMB::Template::Elements;
use LedgerSMB::Template::CSV;
use LedgerSMB::Template::HTML;
-use LedgerSMB::Template::LaTeX;
+my $has_latex = 0;
+ ( eval {require LedgerSMB::Template::LaTeX }
+&& eval {require Template::Latex}
+&& eval {require Template::Plugins::Latex}
+) || ($has_latex = 1) ;
use LedgerSMB::Template::TXT;
$LedgerSMB::Sysconfig::tempdir = 't/var';
@@ -336,41 +340,45 @@
## Rendering tests ##
#####################
-$template = undef;
-$template = new LedgerSMB::Template('user' => $myconfig, 'format' => 'PDF',
+SKIP: {
+ skip "LaTeX modules not installed" unless $has_latex;
+ $template = undef;
+ $template = new LedgerSMB::Template('user' => $myconfig, 'format' => 'PDF',
'template' => '04-template', 'no_auto_output' => 1);
-ok(defined $template,
+ ok(defined $template,
'Template, new (PDF): Object creation with format and template');
-isa_ok($template, 'LedgerSMB::Template',
+ isa_ok($template, 'LedgerSMB::Template',
'Template, new (PDF): Object creation with format and template');
-is($template->{include_path}, 't/data',
+ is($template->{include_path}, 't/data',
'Template, new (PDF): Object creation with format and template');
-is($template->render({'login' => 'foo&bar'}), "t/var/04-template-output-$$.pdf",
+ is($template->render({'login' => 'foo&bar'}),
+ "t/var/04-template-output-$$.pdf",
'Template, render (PDF): Simple PDF template, default filename');
-ok(-e "t/var/04-template-output-$$.pdf",
+ ok(-e "t/var/04-template-output-$$.pdf",
'Template, render (PDF): File created');
-is(unlink("t/var/04-template-output-$$.pdf"), 1,
+ is(unlink("t/var/04-template-output-$$.pdf"), 1,
'Template, render (PDF): removing testfile');
-ok(!-e "t/var/04-template-output-$$.pdf",
+ ok(!-e "t/var/04-template-output-$$.pdf",
'Template, render (PDF): testfile removed');
-$template = undef;
-$template = new LedgerSMB::Template('user' => $myconfig, 'format' => 'PS',
+ $template = undef;
+ $template = new LedgerSMB::Template('user' => $myconfig, 'format' => 'PS',
'template' => '04-template', 'no_auto_output' => 1);
-ok(defined $template,
+ ok(defined $template,
'Template, new (PS): Object creation with format and template');
-isa_ok($template, 'LedgerSMB::Template',
+ isa_ok($template, 'LedgerSMB::Template',
'Template, new (PS): Object creation with format and template');
-is($template->{include_path}, 't/data',
+ is($template->{include_path}, 't/data',
'Template, new (PS): Object creation with format and template');
-is($template->render({'login' => 'foo\&bar'}),
+ is($template->render({'login' => 'foo\&bar'}),
"t/var/04-template-output-$$.ps",
'Template, render (PS): 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,
+ 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",
+ ok(!-e "t/var/04-template-output-$$.ps",
'Template, render (PS): testfile removed');
+}
$template = undef;
$template = new LedgerSMB::Template('user' => $myconfig, 'format' => 'TXT',
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.