t/stow: use like() instead of ok(... =~ /.../)

This commit is contained in:
Adam Spiers 2024-04-01 22:56:32 +01:00
parent 4cac249ddc
commit 1282acf6b5

View file

@ -101,7 +101,8 @@ subtest("Link to a new dir 'bin4' conflicts with existing non-dir so can't unfol
$stow->plan_stow('pkg4'); $stow->plan_stow('pkg4');
%conflicts = $stow->get_conflicts(); %conflicts = $stow->get_conflicts();
is($stow->get_conflict_count, 1); is($stow->get_conflict_count, 1);
ok($conflicts{stow}{pkg4}[0] =~ like(
$conflicts{stow}{pkg4}[0],
qr/existing target is neither a link nor a directory/ qr/existing target is neither a link nor a directory/
=> 'link to new dir bin4 conflicts with existing non-directory' => 'link to new dir bin4 conflicts with existing non-directory'
); );