]> Sergey Matveev's repositories - public-inbox.git/commitdiff
t/solver_git: use like() to improve error reporting
authorEric Wong <e@80x24.org>
Thu, 22 Jul 2021 08:37:36 +0000 (08:37 +0000)
committerEric Wong <e@80x24.org>
Thu, 22 Jul 2021 19:08:55 +0000 (19:08 +0000)
I hit a test failure here, but haven't been able to reproduce
it...

t/solver_git.t

index 13e478b325bcfa3b1c9f4613c99f4971f761461d..fe1aff0bb2a06e6b655ea521a2c59632481ef3d6 100644 (file)
@@ -84,7 +84,7 @@ index 15ac20eb..771486c4
 @@ -1,13 +1,12 @@
  #!perl -w
 EOM
-       ok(index($lei_out, $exp) >= 0,
+       like($lei_out, qr/\Q$exp\E/,
                'preserve mode, regen header + context from -U0 patch');
        my $e = { GIT_DIR => "$ENV{HOME}/.local/share/lei/store/ALL.git" };
        my @x = xqx([qw(git cat-file --batch-all-objects --batch-check)], $e);