tests: use like for testing regexes

This gives us better diagnostics when the test fails.
This commit is contained in:
Jörg Thalheim
2024-08-21 08:34:25 +02:00
parent 7de7122479
commit 250780aaf2
4 changed files with 10 additions and 9 deletions
+1 -1
View File
@@ -186,7 +186,7 @@ subtest 'Update jobset "job" to have an invalid input type' => sub {
})
);
ok(!$jobsetupdate->is_success);
ok($jobsetupdate->content =~ m/Invalid input type.*valid types:/);
like($jobsetupdate->content, qr/Invalid input type.*valid types:/);
};