isync

mailbox synchronization program
git clone https://git.code.sf.net/p/isync/isync
Log | Files | Refs | README | LICENSE

commit 640b2a6649431fcf6f4239e6bae96711088ecf7a
parent 9f9a2af959d81a0b2d22920c6390841590a028c8
Author: Oswald Buddenhagen <ossi@users.sf.net>
Date:   Sun, 20 Feb 2022 20:34:36 +0100

autotest: factor out mkstate()

for clarity and structural consistency.

Diffstat:
Msrc/run-tests.pl | 20++++++++++++++------
1 file changed, 14 insertions(+), 6 deletions(-)

diff --git a/src/run-tests.pl b/src/run-tests.pl @@ -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($$) {