Browse Source

autotest: factor out mkstate()

for clarity and structural consistency.
wip/maildir-path-under-inbox
Oswald Buddenhagen 3 years ago
parent
commit
640b2a6649
  1. 20
      src/run-tests.pl

20
src/run-tests.pl

@ -519,14 +519,11 @@ sub mkbox($$)
} }
} }
# \@chan_state # \@state
sub mkchan($) sub mkstate($)
{ {
my ($cs) = @_; my ($t) = @_;
my ($f, $n, $t) = @$cs;
mkbox("far", $f);
mkbox("near", $n);
open(FILE, ">", "near/.mbsyncstate") or open(FILE, ">", "near/.mbsyncstate") or
die "Cannot create sync state.\n"; die "Cannot create sync state.\n";
print FILE "FarUidValidity 1\nMaxPulledUid ".$$t[0]."\n". print FILE "FarUidValidity 1\nMaxPulledUid ".$$t[0]."\n".
@ -537,6 +534,17 @@ sub mkchan($)
close FILE; close FILE;
} }
# \@chan_state
sub mkchan($)
{
my ($cs) = @_;
my ($f, $n, $t) = @$cs;
mkbox("far", $f);
mkbox("near", $n);
mkstate($t);
}
# $box_name, \@box_state # $box_name, \@box_state
sub ckbox($$) sub ckbox($$)
{ {

Loading…
Cancel
Save