diff options
author | tetragon <tetragon@4979c152-3d1c-0410-bac9-87ea11338e46> | 2007-05-20 00:34:30 +0000 |
---|---|---|
committer | tetragon <tetragon@4979c152-3d1c-0410-bac9-87ea11338e46> | 2007-05-20 00:34:30 +0000 |
commit | 3a7d684e2392a3b151fdb80103c5200d837c14ca (patch) | |
tree | d79f5c9968c093240b26ab5d0887e688bcacf72b /t | |
parent | 9571a18107e3e132c7c211b762e4dc366ecf56bf (diff) |
Update LedgerSMB.pm tests to reflect that calls to error will no longer fail
git-svn-id: https://ledger-smb.svn.sourceforge.net/svnroot/ledger-smb/trunk@1220 4979c152-3d1c-0410-bac9-87ea11338e46
Diffstat (limited to 't')
-rw-r--r-- | t/11-ledgersmb.t | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/t/11-ledgersmb.t b/t/11-ledgersmb.t index a221cb0e..1b418164 100644 --- a/t/11-ledgersmb.t +++ b/t/11-ledgersmb.t @@ -17,6 +17,10 @@ sub redirect { print "redirected\n"; } +sub lsmb_error_func { + print $_[0]; +} + ##line subroutine ##108 new ##235 redirect @@ -175,12 +179,15 @@ ok(defined $lsmb->{menubar}, 'new: lynx, menubar defined (deprecated)'); 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'); -} +@r = trap{new LedgerSMB('script=foo/bar.pl')}; +is($trap->die, "Error: Access Denied\n", + 'new: directory traversal 1 caught'); +@r = trap{new LedgerSMB('script=foo\\bar.pl')}; +is($trap->die, "Error: Access Denied\n", + 'new: directory traversal 2 caught'); +@r = trap{new LedgerSMB('script=..')}; +is($trap->die, "Error: Access Denied\n", + 'new: directory traversal 3 caught'); # $lsmb->redirect checks $lsmb = new LedgerSMB; |