added lots of unittests and while I was at it, fixed a couple of bugs in the

backend modules.
This commit is contained in:
git@daemon.de
2013-07-08 15:36:04 +02:00
parent e4cf9ff015
commit f40e4c97e7
9 changed files with 173 additions and 74 deletions

View File

@@ -4,7 +4,7 @@
package NOTEDB::text;
$NOTEDB::text::VERSION = "1.03";
$NOTEDB::text::VERSION = "1.04";
use strict;
#use Data::Dumper;
@@ -30,7 +30,7 @@ sub new {
my $self = {};
bless($self,$class);
$self->{NOTEDB} = $param{dbname} || File::Spec->catfile($ENV{HOME}, ".notedb");
$self->{NOTEDB} = $self->{dbname} = $param{dbname} || File::Spec->catfile($ENV{HOME}, ".notedb");
if(! -e $param{dbname}) {
open(TT,">$param{dbname}") or die "Could not create $param{dbname}: $!\n";
@@ -77,7 +77,7 @@ sub set_del_all {
sub get_single {
my($this, $num) = @_;
my($address, $note, $date, $buffer, $n, $t, $buffer, );
my($address, $note, $date, $n, $t, $buffer, );
my %data = $this->get_all();