diff options
author | Guilhem Moulin <guilhem@fripost.org> | 2019-11-09 03:13:45 +0100 |
---|---|---|
committer | Guilhem Moulin <guilhem@fripost.org> | 2019-11-13 06:23:56 +0100 |
commit | 67440844c422ee30b31df9a46a7f99ac0e833add (patch) | |
tree | 989381e5b94d5939dafdd1e99c7db2ada95355ec /interimap | |
parent | b9da6cc7ecf71026d1023dc3354b820c7518426e (diff) |
Refactor and improve test suite.
Diffstat (limited to 'interimap')
-rwxr-xr-x | interimap | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -396,7 +396,7 @@ fail(undef, "Local and remote namespaces are neither both flat nor both hierarch fail(undef, "Local and remote hierachy delimiters differ ", "(local ", print_delimiter($IMAP->{local}->{delimiter}), ", ", "remote ", print_delimiter($IMAP->{remote}->{delimiter}), "), ", - "refusing to update \`mailboxes\` table.") + "refusing to update table \`mailboxes\`.") if defined $IMAP->{local}->{delimiter} and defined $IMAP->{remote}->{delimiter} # we failed earlier if only one of them was NIL and $IMAP->{local}->{delimiter} ne $IMAP->{remote}->{delimiter}; @@ -418,7 +418,7 @@ fail(undef, "Local and remote namespaces are neither both flat nor both hierarch $DBH->do("DROP TABLE mailboxes"); $DBH->do("ALTER TABLE _tmp${DATABASE_VERSION}_mailboxes RENAME TO mailboxes"); } - fail("database", "Broken referential integrity! Refusing to commit changes.") + fail("database", "Broken referential integrity! Refusing to commit changes.") if defined $DBH->selectrow_arrayref("PRAGMA foreign_key_check"); SCHEMA_DONE: $DBH->do("PRAGMA user_version = $DATABASE_VERSION"); @@ -530,6 +530,7 @@ if (defined $COMMAND and $COMMAND eq 'delete') { qw/mapping local remote mailboxes/ if @ARGV and $CONFIG{target}->{database}; foreach my $mailbox (@ARGV) { + fail(undef, "INBOX can't be deleted") if uc($mailbox) eq "INBOX"; # RFC 3501 sec. 6.3.4 my $idx = db_get_mailbox_idx($mailbox); # delete $mailbox on servers where $mailbox exists. note that |