t: test result of "remove regex"
authorMischa POSLAWSKY <perl@shiar.org>
Sat, 21 Apr 2012 02:35:15 +0000 (04:35 +0200)
committerMischa POSLAWSKY <perl@shiar.org>
Thu, 3 May 2012 10:38:21 +0000 (12:38 +0200)
t/10-fileset.t

index 654242a8fa14d8014643e97a1e86013275649d7f..ff43498731a4f4868cdf640fdab8b7d7832b7c7f 100644 (file)
@@ -50,7 +50,7 @@ my $BASICBODY = "replace$/noremove$/remove$/.$/";
 testfileset('no match',      $BASICBODY,    ['no'      => undef], 0, $BASICBODY);
 testfileset('remove string', $BASICBODY,    ['remove'  => undef], 1, "replace$/noremove$/.$/");
 testfileset('remove empty',  "$/.$/ $/$/",  [''        => undef], 2, ".$/ $/");
-testfileset('remove regex',  $BASICBODY,    [qr/^re/   => undef], 2);
+testfileset('remove regex',  $BASICBODY,    [qr/^re/   => undef], 2, "noremove$/.$/");
 testfileset('remove all',    $BASICBODY,    [qr/./     => undef], 4, '');
 
 testfileset('add unconditionally', "$/0$/", [undef()   => '0'], 1, "$/0$/0$/");
@@ -65,7 +65,7 @@ testfileset('replace by array', "$/foo$/.$/", ['' => ['foo','']], 3, "foo$/.$/fo
 testfileset('partial add',    "foo$/$/",    ['foo' => ['foo','.']], 1, "foo$/$/.$/");
 
 my $SAMPLE2 = "$/foo$/and$/bar$/.$/";
-testfileset('keep pair',      $SAMPLE2, [['foo','bar']], 0, "$/foo$/and$/bar$/.$/");
+testfileset('keep pair',      $SAMPLE2, [['foo','bar']], 0, $SAMPLE2);
 testfileset('keep order',     $SAMPLE2, [['bar','foo']], 2, "$/and$/bar$/.$/foo$/");
 testfileset('replace pair',   $SAMPLE2, [['bar','foo'] => ['fooo','barr']], 4, "$/and$/.$/fooo$/barr$/");
 testfileset('mixed arrays',   $SAMPLE2, [['ignore',qr/a/] => ['bar','foo','.']], 3, "$/foo$/bar$/.$/foo$/.$/");