瀏覽代碼

Whitespace cleanup

Alois Mahdal 11 年之前
父節點
當前提交
afa3239a81
共有 3 個檔案被更改,包括 7 行新增7 行删除
  1. 4
    2
      lib/SugarTrail/Repo/Filesystem.pm
  2. 1
    2
      t/Cond.t
  3. 2
    3
      t/Repo.t

+ 4
- 2
lib/SugarTrail/Repo/Filesystem.pm 查看文件

13
 sub new {
13
 sub new {
14
     my $class   = shift;
14
     my $class   = shift;
15
     my $args    = { @_ };
15
     my $args    = { @_ };
16
-    exists($args->{$_}) or croak "missing mandatory parameter: $_" foreach (qw/root/);
16
+    exists($args->{$_}) or croak "missing mandatory parameter: $_"
17
+        foreach (qw/root/);
17
     my $self    = { %$args };
18
     my $self    = { %$args };
18
     unless (-d $args->{root}) {
19
     unless (-d $args->{root}) {
19
-       $self->{last_error} = "invalid repository root directory: " . $args->{root};
20
+       $self->{last_error} = "invalid repository root directory: "
21
+       . $args->{root};
20
        carp $self->{last_error};
22
        carp $self->{last_error};
21
     }
23
     }
22
     return bless $self, $class;
24
     return bless $self, $class;

+ 1
- 2
t/Cond.t 查看文件

12
 ok($c, "c is true");
12
 ok($c, "c is true");
13
 ok($c->match($params), "params match");
13
 ok($c->match($params), "params match");
14
 
14
 
15
-
16
 &helper::dmupp(condition=>$c);
15
 &helper::dmupp(condition=>$c);
16
+
17
 done_testing();
17
 done_testing();
18
-# os=@w7a,wxx;proto==imap;ver>=2012;

+ 2
- 3
t/Repo.t 查看文件

13
 ok($stm,            "master is true");
13
 ok($stm,            "master is true");
14
 
14
 
15
 my ($hc,$bc) = $stm->parse();
15
 my ($hc,$bc) = $stm->parse();
16
-
17
 is($hc, 6,  "parse() reported 6 headers");
16
 is($hc, 6,  "parse() reported 6 headers");
18
 is($bc, 13, "parse() reported 13 non-header lines");
17
 is($bc, 13, "parse() reported 13 non-header lines");
19
 
18
 
20
-&helper::dmup(master=>$stm);
21
-
22
 my $sts = $stm->generate_slave({ proto => "imap", os => "wxx" });
19
 my $sts = $stm->generate_slave({ proto => "imap", os => "wxx" });
23
 ok($sts,            "slave is true");
20
 ok($sts,            "slave is true");
21
+
22
+&helper::dmup(master=>$stm);
24
 &helper::dmup(slave=>$sts);
23
 &helper::dmup(slave=>$sts);
25
 
24
 
26
 done_testing();
25
 done_testing();