From 65aba0dc20a2d5389ec13782d839358a702ba357 Mon Sep 17 00:00:00 2001 From: Tomas Cohen Arazi Date: Tue, 29 Oct 2024 07:41:57 -0300 Subject: [PATCH] Bug 36977: (QA follow-up) Adapt tests Signed-off-by: Tomas Cohen Arazi Signed-off-by: Katrin Fischer --- t/db_dependent/Sitemapper.t | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/t/db_dependent/Sitemapper.t b/t/db_dependent/Sitemapper.t index 3faaa168c2..ebf69ce402 100755 --- a/t/db_dependent/Sitemapper.t +++ b/t/db_dependent/Sitemapper.t @@ -68,7 +68,7 @@ subtest 'Sitemapper' => sub { - http://www.mylibrary.org/sitemap0001.xml + http://www.mylibrary.org/sitemap_0001.xml $now @@ -76,8 +76,8 @@ EOS chop $expected_content; is( $file_content, $expected_content, 'Its content is valid' ); - $file = "$dir/sitemap0001.xml"; - ok( -e $file, 'File sitemap0001.xml created' ); + $file = "$dir/sitemap_0001.xml"; + ok( -e $file, 'File sitemap_0001.xml created' ); $file_content = read_file($file); $expected_content = <<"EOS"; @@ -105,8 +105,8 @@ EOS ); $sitemapper->run( "biblionumber>=$id1" ); - $file = "$dir/sitemap0001.xml"; - ok( -e $file, 'File sitemap0001.xml with short URLs created' ); + $file = "$dir/sitemap_0001.xml"; + ok( -e $file, 'File sitemap_0001.xml with short URLs created' ); $file_content = read_file($file); $expected_content = <<"EOS"; @@ -147,11 +147,11 @@ EOS - http://www.mylibrary.org/sitemap0001.xml + http://www.mylibrary.org/sitemap_0001.xml $now - http://www.mylibrary.org/sitemap0002.xml + http://www.mylibrary.org/sitemap_0002.xml $now @@ -159,8 +159,8 @@ EOS chop $expected_content; is( $file_content, $expected_content, 'Its content is valid' ); - $file = "$dir/sitemap0001.xml"; - ok( -e $file, 'File sitemap0001.xml created' ); + $file = "$dir/sitemap_0001.xml"; + ok( -e $file, 'File sitemap_0001.xml created' ); open my $fh, '<', $file or croak; my $count = 0; @@ -170,8 +170,8 @@ EOS close $fh; is( $count, 6, 'It contains 6 URLs' ); - $file = "$dir/sitemap0002.xml"; - ok( -e $file, 'File sitemap0002.xml created' ); + $file = "$dir/sitemap_0002.xml"; + ok( -e $file, 'File sitemap_0002.xml created' ); open $fh, '<', $file or croak; $count = 0; @@ -182,7 +182,7 @@ EOS is( $count, 4, 'It contains 4 URLs' ); # Cleanup - for my $file (qw/sitemapindex.xml sitemap0001.xml sitemap0002.xml/) { + for my $file (qw/sitemapindex.xml sitemap_0001.xml sitemap_0002.xml/) { unlink "$dir/$file"; } }; -- 2.39.5