From 30b72444fe71133333699d31692a152c3ff6d1da Mon Sep 17 00:00:00 2001 From: Aleisha Amohia Date: Fri, 26 Aug 2022 11:18:39 +1200 Subject: [PATCH] Bug 31466: Fix t/00-check-atomic-updates.t to pass if atomic updates The way the test was previously written, it would fail if atomic updates matched the format /.*pl$/ . This is incorrect because atomic update names should match the format /.*pl/. To test: 1) Run t/00-check-atomic-updates.t. Confirm test passes 2) Add an atomic update. Use the example from https://wiki.koha-community.org/wiki/Database_updates#How_to_write_an_atomicupdate_file 3) Run t/00-check-atomic-updates.t. Confirm test fails 4) Apply patch and run t/00-check-atomic-updates.t. Test should pass! Sponsored-by: Catalyst IT --- t/00-check-atomic-updates.t | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/t/00-check-atomic-updates.t b/t/00-check-atomic-updates.t index d9ad730815..1e1e556fb4 100755 --- a/t/00-check-atomic-updates.t +++ b/t/00-check-atomic-updates.t @@ -31,7 +31,9 @@ sub wanted { foreach my $f (@files) { next if $f eq 'skeleton.pl'; - unlike( $f, qr/.*pl$/, "check for unhandled atomic updates: $f" ); + next if $f eq 'README'; + next if $f eq '.'; + like( $f, qr/.*pl$/, "check for unhandled atomic updates: $f" ); } done_testing(); -- 2.11.0