[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

SF.net SVN: ledger-smb: [1220] trunk/t/11-ledgersmb.t



Revision: 1220
          http://svn.sourceforge.net/ledger-smb/?rev=1220&view=rev
Author:   tetragon
Date:     2007-05-19 17:34:30 -0700 (Sat, 19 May 2007)

Log Message:
-----------
Update LedgerSMB.pm tests to reflect that calls to error will no longer fail

Modified Paths:
--------------
    trunk/t/11-ledgersmb.t

Modified: trunk/t/11-ledgersmb.t
===================================================================
--- trunk/t/11-ledgersmb.t	2007-05-20 00:08:30 UTC (rev 1219)
+++ trunk/t/11-ledgersmb.t	2007-05-20 00:34:30 UTC (rev 1220)
@@ -17,6 +17,10 @@
 	print "redirected\n";
 }
 
+sub lsmb_error_func {
+	print $_[0];
+}
+
 ##line	subroutine
 ##108	new
 ##235	redirect
@@ -175,12 +179,15 @@
 is($lsmb->{menubar}, 1, 'new: lynx, menubar enabled (deprecated)');
 ok(defined $lsmb->{version}, 'new: lynx, version defined');
 
-TODO: {
-	local $TODO = 'Error handling for LedgerSMB';
-	@r = trap{new LedgerSMB('script=foo/bar.pl')};
-	is($trap->die, "Error: Access Denied\n",
-		'new: directory traversal caught');
-}
..hidden.. = trap{new LedgerSMB('script=foo/bar.pl')};
+is($trap->die, "Error: Access Denied\n",
+	'new: directory traversal 1 caught');
..hidden.. = trap{new LedgerSMB('script=foo\\bar.pl')};
+is($trap->die, "Error: Access Denied\n",
+	'new: directory traversal 2 caught');
..hidden.. = trap{new LedgerSMB('script=..')};
+is($trap->die, "Error: Access Denied\n",
+	'new: directory traversal 3 caught');
 
 # $lsmb->redirect checks
 $lsmb = new LedgerSMB;


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.