autotest: factor out mkstate()

for clarity and structural consistency.
This commit is contained in:
Oswald Buddenhagen 2022-02-20 20:34:36 +01:00
parent 9f9a2af959
commit 640b2a6649

View File

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