[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
SF.net SVN: ledger-smb:[6578] branches/1.3
- Subject: SF.net SVN: ledger-smb:[6578] branches/1.3
- From: ..hidden..
- Date: Tue, 21 Jan 2014 09:41:26 +0000
Revision: 6578
http://sourceforge.net/p/ledger-smb/code/6578
Author: einhverfr
Date: 2014-01-21 09:41:25 +0000 (Tue, 21 Jan 2014)
Log Message:
-----------
Removing header tests. This isn't really a software contract issue relevant to testing and consequently any tweak we'd make here would end up setting off multiple test failures.
Modified Paths:
--------------
branches/1.3/LedgerSMB/AM.pm
branches/1.3/LedgerSMB/File.pm
branches/1.3/t/10-form.t
Modified: branches/1.3/LedgerSMB/AM.pm
===================================================================
--- branches/1.3/LedgerSMB/AM.pm 2014-01-21 09:15:39 UTC (rev 6577)
+++ branches/1.3/LedgerSMB/AM.pm 2014-01-21 09:41:25 UTC (rev 6578)
@@ -1710,7 +1710,7 @@
);
if (!@{$defaults}){
- $defaults = qw(inventory_accno_id income_accno_id expense_accno_id
+ @$defaults = qw(inventory_accno_id income_accno_id expense_accno_id
fxgain_accno_id fxloss_accno_id glnumber sinumber vinumber
sonumber ponumber sqnumber rfqnumber partnumber
employeenumber customernumber vendornumber projectnumber
Modified: branches/1.3/LedgerSMB/File.pm
===================================================================
--- branches/1.3/LedgerSMB/File.pm 2014-01-21 09:15:39 UTC (rev 6577)
+++ branches/1.3/LedgerSMB/File.pm 2014-01-21 09:41:25 UTC (rev 6578)
@@ -209,18 +209,18 @@
$dbobject = LedgerSMB::DBObject->new({base => $lsmb});
$logger->debug("\$dbobject->{dbh}=$dbobject->{dbh}");
} else {
- $rc | 2; # No locale
+ $rc = $rc | 2; # No locale
}
}
elsif (LedgerSMB->isa($args->{base})){
$dbobject = LedgerSMB::DBObject->new({base => $args->{base}});
}
else {
- $rc | 4; # Incorrect base type
+ $rc = $rc | 4; # Incorrect base type
}
$logger->debug("end");
if (!$dbobject->{dbh}){
- $rc | 1; # No database handle
+ $rc = $rc | 1; # No database handle
}
if ($rc){
return $rc; # Return error.
Modified: branches/1.3/t/10-form.t
===================================================================
--- branches/1.3/t/10-form.t 2014-01-21 09:15:39 UTC (rev 6577)
+++ branches/1.3/t/10-form.t 2014-01-21 09:41:25 UTC (rev 6578)
@@ -199,9 +199,6 @@
delete $form->{header};
$ENV{LSMB_NOHEAD} = 0;
-@r = trap{$form->info('hello world')};
-like($trap->stdout, qr|Content-Type: text/html; charset=utf-8\n+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" \n\s+"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">\n<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">\n<head>\n\s+<title></title>\n\s+<meta http-equiv="Pragma" content="no-cache" />\n\s+<meta http-equiv="Expires" content="-1" />\n\s+<link rel="shortcut icon" href="favicon.ico" type="image/x-icon" />[\n\s]+<meta http-equiv="content-type" content="text/html; charset=utf-8" />[\n\s]+<meta name="robots" content="noindex,nofollow" />[\n\s]+</head>[\n\s]+<body><b>hello world</b>|,
- 'info: CGI, header content');
delete $ENV{GATEWAY_INTERFACE};
delete $ENV{info_function};
@@ -237,8 +234,6 @@
@r = trap{$form->error('hello world')};
is($trap->exit, undef,
'error: CGI, normal termination');
-like($trap->stdout, qr|Content-Type: text/html; charset=utf-8\n+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" \n\s+"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">\n<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">\n<head>\n\s+<title></title>\n\s+<meta http-equiv="Pragma" content="no-cache" />\n\s+<meta http-equiv="Expires" content="-1" />\n\s+<link rel="shortcut icon" href="favicon.ico" type="image/x-icon" />[\n\s]+<meta http-equiv="content-type" content="text/html; charset=utf-8" />[\n\s]+<meta name="robots" content="noindex,nofollow" />[\n\s]+</head>[\n\s]+<body><h2 class="error">Error!</h2> <p><b>hello world</b></body>|,
- 'error: CGI, header content');
delete $ENV{GATEWAY_INTERFACE};
delete $ENV{error_function};
@@ -311,62 +306,31 @@
delete $form->{title};
delete $form->{pre};
$ENV{LSMB_NOHEAD} = 0;
-@r = trap{$form->header};
-like($trap->stdout, qr|Content-Type: text/html; charset=utf-8\n\n+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" \n\s+"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">\n<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">\n<head>\n\s+<title></title>\n\s+<meta http-equiv="Pragma" content="no-cache" />\n\s+<meta http-equiv="Expires" content="-1" />\n\s+<link rel="shortcut icon" href="favicon.ico" type="image/x-icon" />[\n\s]+<meta http-equiv="content-type" content="text/html; charset=utf-8" />[\n\s]+<meta name="robots" content="noindex,nofollow" />[\n\s]+</head>[\n\s]+|,
- 'header: unset');
delete $form->{header};
$ENV{LSMB_NOHEAD} = 0;
-@r = trap{$form->header(1, 'hello world')};
-like($trap->stdout, qr|Content-Type: text/html; charset=utf-8\n\n+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" \n\s+"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">\n<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">\n<head>\n\s+<title></title>\n\s+<meta http-equiv="Pragma" content="no-cache" />\n\s+<meta http-equiv="Expires" content="-1" />\n\s+<link rel="shortcut icon" href="favicon.ico" type="image/x-icon" />[\n\s]+<meta http-equiv="content-type" content="text/html; charset=utf-8" />[\n\s]+<meta name="robots" content="noindex,nofollow" />[\n\s]+hello world[\n\s]+</head>[\n\s]+|,
- 'header: headeradd');
delete $form->{header};
$ENV{LSMB_NOHEAD} = 0;
-$form->{pre} = 'hello world';
-@r = trap{$form->header};
-like($trap->stdout, qr|Content-Type: text/html; charset=utf-8\n\n+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" \n\s+"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">\n<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">\n<head>\n\s+<title></title>\n\s+<meta http-equiv="Pragma" content="no-cache" />\n\s+<meta http-equiv="Expires" content="-1" />\n\s+<link rel="shortcut icon" href="favicon.ico" type="image/x-icon" />[\n\s]+<meta http-equiv="content-type" content="text/html; charset=utf-8" />[\n\s]+<meta name="robots" content="noindex,nofollow" />[\n\s]+</head>[\n\s]+hello world \n|,
- 'header: pre => \'hello world\'');
-delete $form->{pre};
delete $form->{header};
$form->{titlebar} = 'hello';
$ENV{LSMB_NOHEAD} = 0;
-@r = trap{$form->header};
-like($trap->stdout, qr|Content-Type: text/html; charset=utf-8\n\n+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" \n\s+"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">\n<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">\n<head>\n\s+<title>hello</title>\n\s+<meta http-equiv="Pragma" content="no-cache" />\n\s+<meta http-equiv="Expires" content="-1" />\n\s+<link rel="shortcut icon" href="favicon.ico" type="image/x-icon" />[\n\s]+<meta http-equiv="content-type" content="text/html; charset=utf-8" />[\n\s]+<meta name="robots" content="noindex,nofollow" />[\n\s]+</head>[\n\s]+|,
- 'header: titlebar => \'hello\'');
delete $form->{header};
$ENV{LSMB_NOHEAD} = 0;
$form->{title} = 'world';
-@r = trap{$form->header};
-like($trap->stdout, qr|Content-Type: text/html; charset=utf-8\n\n+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" \n\s+"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">\n<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">\n<head>\n\s+<title>world - hello</title>\n\s+<meta http-equiv="Pragma" content="no-cache" />\n\s+<meta http-equiv="Expires" content="-1" />\n\s+<link rel="shortcut icon" href="favicon.ico" type="image/x-icon" />[\n\s]+<meta http-equiv="content-type" content="text/html; charset=utf-8" />[\n\s]+<meta name="robots" content="noindex,nofollow" />[\n\s]+</head>[\n\s]+|,
- 'header: titlebar => \'hello\', title => \'world\'');
delete $form->{title};
delete $form->{titlebar};
delete $form->{header};
$form->{charset} = 'UTF-8';
$ENV{LSMB_NOHEAD} = 0;
-@r = trap{$form->header};
-like($trap->stdout, qr|Content-Type: text/html; charset=utf-8\n\n+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" \n\s+"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">\n<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">\n<head>\n\s+<title></title>\n\s+<meta http-equiv="Pragma" content="no-cache" />\n\s+<meta http-equiv="Expires" content="-1" />\n\s+<link rel="shortcut icon" href="favicon.ico" type="image/x-icon" />[\n\s]+<meta http-equiv="content-type" content="text/html; charset=UTF-8" />[\n\s]+<meta name="robots" content="noindex,nofollow" />[\n\s]+</head>[\n\s]+|,
- 'header: charset => \'UTF-8\'');
-delete $form->{charset};
delete $form->{header};
$form->{stylesheet} = "not a real file.$$";
$ENV{LSMB_NOHEAD} = 0;
-@r = trap{$form->header};
-like($trap->stdout, qr|Content-Type: text/html; charset=utf-8\n\n+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" \n\s+"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">\n<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">\n<head>\n\s+<title></title>\n\s+<meta http-equiv="Pragma" content="no-cache" />\n\s+<meta http-equiv="Expires" content="-1" />\n\s+<link rel="shortcut icon" href="favicon.ico" type="image/x-icon" />[\n\s]+<meta http-equiv="content-type" content="text/html; charset=utf-8" />[\n\s]+<meta name="robots" content="noindex,nofollow" />[\n\s]+</head>[\n\s]+|,
- "header: stylesheet => 'not a real file.$$'");
-delete $form->{header};
-$form->{stylesheet} = 'ledgersmb.css';
-$ENV{LSMB_NOHEAD} = 0;
-@r = trap{$form->header};
-like($trap->stdout, qr|Content-Type: text/html; charset=utf-8\n\n+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" \n\s+"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">\n<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">\n<head>\n\s+<title></title>\n\s+<meta http-equiv="Pragma" content="no-cache" />\n\s+<meta http-equiv="Expires" content="-1" />\n\s+<link rel="shortcut icon" href="favicon.ico" type="image/x-icon" />[\n\s]+<link rel="stylesheet" href="css/ledgersmb.css" type="text/css" title="LedgerSMB stylesheet" />[\n\s]+<meta http-equiv="content-type" content="text/html; charset=utf-8" />[\n\s]+<meta name="robots" content="noindex,nofollow" />[\n\s]+</head>[\n\s]+|,
- 'header: stylesheet => \'ledgersmb.css\'');
-
delete $ENV{GATEWAY_INTERFACE};
delete $form->{header};
$ENV{LSMB_NOHEAD} = 0;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
------------------------------------------------------------------------------
CenturyLink Cloud: The Leader in Enterprise Cloud Services.
Learn Why More Businesses Are Choosing CenturyLink Cloud For
Critical Workloads, Development Environments & Everything In Between.
Get a Quote or Start a Free Trial Today.
http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk
_______________________________________________
Ledger-smb-commits mailing list
..hidden..
https://lists.sourceforge.net/lists/listinfo/ledger-smb-commits