autotest: factor out mkstate()
for clarity and structural consistency.
This commit is contained in:
parent
9f9a2af959
commit
640b2a6649
|
@ -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…
Reference in New Issue
Block a user