t/unstow_orig.t: use like() for regexp matching tests

This is better because it outputs the mismatching value when
the matching check fails.
This commit is contained in:
Adam Spiers 2024-04-06 11:58:56 +01:00
parent 599944bce1
commit 6d6781dcef

View file

@ -330,8 +330,9 @@ subtest("Unstowing when target contains a real file shouldn't be an issue", sub
is($stow->get_tasks, 0, 'no tasks to process when unstowing pkg12 for third time');
%conflicts = $stow->get_conflicts;
is($stow->get_conflict_count, 1);
ok($conflicts{unstow}{pkg12}[0]
=~ m!existing target is neither a link nor a directory: man12/man1/file12\.1!
like(
$conflicts{unstow}{pkg12}[0],
qr!existing target is neither a link nor a directory: man12/man1/file12\.1!
=> 'unstow pkg12 for third time'
);
});