commit 640b2a6649431fcf6f4239e6bae96711088ecf7a
Author: Oswald Buddenhagen <o...@users.sf.net>
Date:   Sun Feb 20 20:34:36 2022 +0100

    autotest: factor out mkstate()
    
    for clarity and structural consistency.

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

diff --git a/src/run-tests.pl b/src/run-tests.pl
index 08684db3..6f56dcfa 100755
--- 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($$)
 {


_______________________________________________
isync-devel mailing list
isync-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/isync-devel

Reply via email to