Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package perl-Test-File for openSUSE:Factory checked in at 2021-02-23 20:20:24 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/perl-Test-File (Old) and /work/SRC/openSUSE:Factory/.perl-Test-File.new.2378 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "perl-Test-File" Tue Feb 23 20:20:24 2021 rev:3 rq:874524 version:1.446 Changes: -------- --- /work/SRC/openSUSE:Factory/perl-Test-File/perl-Test-File.changes 2021-01-08 17:34:00.885100609 +0100 +++ /work/SRC/openSUSE:Factory/.perl-Test-File.new.2378/perl-Test-File.changes 2021-02-23 20:22:10.503749604 +0100 @@ -1,0 +2,18 @@ +Mon Feb 22 16:48:23 UTC 2021 - Tina M??ller <timueller+p...@suse.de> + +- updated to 1.446 + see /usr/share/doc/packages/perl-Test-File/Changes + + 1.446 2021-02-20T21:18:48Z + * Better cygwin detection, from Achim Gratz + +------------------------------------------------------------------- +Wed Feb 17 03:13:06 UTC 2021 - Tina M??ller <timueller+p...@suse.de> + +- updated to 1.445 + see /usr/share/doc/packages/perl-Test-File/Changes + + 1.445 2021-02-16T08:57:34Z + * Get the tests to pass under Cygwin (Github #17, from Slaven Rezi??) + +------------------------------------------------------------------- Old: ---- Test-File-1.444.tar.gz New: ---- Test-File-1.446.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ perl-Test-File.spec ++++++ --- /var/tmp/diff_new_pack.ralixt/_old 2021-02-23 20:22:11.119750149 +0100 +++ /var/tmp/diff_new_pack.ralixt/_new 2021-02-23 20:22:11.123750152 +0100 @@ -18,7 +18,7 @@ %define cpan_name Test-File Name: perl-Test-File -Version: 1.444 +Version: 1.446 Release: 0 Summary: Test file attributes License: Artistic-2.0 ++++++ Test-File-1.444.tar.gz -> Test-File-1.446.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Test-File-1.444/Changes new/Test-File-1.446/Changes --- old/Test-File-1.444/Changes 2021-01-06 04:42:30.000000000 +0100 +++ new/Test-File-1.446/Changes 2021-02-20 22:18:53.000000000 +0100 @@ -1,5 +1,11 @@ Revision history for Perl module Test::File +1.446 2021-02-20T21:18:48Z + * Better cygwin detection, from Achim Gratz + +1.445 2021-02-16T08:57:34Z + * Get the tests to pass under Cygwin (Github #17, from Slaven Rezi??) + 1.444 2021-01-06T03:40:19Z * Remove Travis, add GitHub actions * Add file_is_symlink_not_ok diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Test-File-1.444/MANIFEST.SKIP new/Test-File-1.446/MANIFEST.SKIP --- old/Test-File-1.444/MANIFEST.SKIP 2021-01-06 04:42:30.000000000 +0100 +++ new/Test-File-1.446/MANIFEST.SKIP 2021-02-20 22:18:53.000000000 +0100 @@ -59,10 +59,14 @@ #!end included /usr/local/perls/perl-5.20.0/lib/5.20.0/ExtUtils/MANIFEST.SKIP -\.travis\.yml \.?appveyor.yml \.?releaserc \.lwpcookies \.github\b Test-.* +\bMANIFEST\s\d +\bChanges\s\d +\.icloud$ +\A\.github\b + diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Test-File-1.444/META.json new/Test-File-1.446/META.json --- old/Test-File-1.444/META.json 2021-01-06 04:42:32.000000000 +0100 +++ new/Test-File-1.446/META.json 2021-02-20 22:18:55.000000000 +0100 @@ -4,7 +4,7 @@ "brian d foy <bd...@cpan.org>" ], "dynamic_config" : 1, - "generated_by" : "ExtUtils::MakeMaker version 7.34, CPAN::Meta::Converter version 2.150010", + "generated_by" : "ExtUtils::MakeMaker version 7.44, CPAN::Meta::Converter version 2.150010", "keywords" : [ "testing", "file" @@ -71,6 +71,6 @@ "web" : "https://github.com/briandfoy/test-file" } }, - "version" : "1.444", - "x_serialization_backend" : "JSON::PP version 4.02" + "version" : "1.446", + "x_serialization_backend" : "JSON::PP version 4.04" } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Test-File-1.444/META.yml new/Test-File-1.446/META.yml --- old/Test-File-1.444/META.yml 2021-01-06 04:42:32.000000000 +0100 +++ new/Test-File-1.446/META.yml 2021-02-20 22:18:54.000000000 +0100 @@ -11,7 +11,7 @@ ExtUtils::MakeMaker: '6.64' File::Spec::Functions: '0' dynamic_config: 1 -generated_by: 'ExtUtils::MakeMaker version 7.34, CPAN::Meta::Converter version 2.150010' +generated_by: 'ExtUtils::MakeMaker version 7.44, CPAN::Meta::Converter version 2.150010' keywords: - testing - file @@ -39,5 +39,5 @@ bugtracker: https://github.com/briandfoy/test-file/issues homepage: https://github.com/briandfoy/test-file repository: https://github.com/briandfoy/test-file.git -version: '1.444' +version: '1.446' x_serialization_backend: 'CPAN::Meta::YAML version 0.018' diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Test-File-1.444/README.pod new/Test-File-1.446/README.pod --- old/Test-File-1.444/README.pod 2021-01-06 04:42:30.000000000 +0100 +++ new/Test-File-1.446/README.pod 2021-02-20 22:18:53.000000000 +0100 @@ -2,11 +2,11 @@ =encoding utf8 -=for HTML <a href="https://github.com/briandfoy/test-file/actions?query=workflow%3Amacos"><img src="https://github.com/briandfoy/test-file/workflows/macos/badge.svg"></a> +=for HTML <a href="https://www.github.com/briandfoy/test-file/actions?query=workflow%3Amacos"><img src="https://www.github.com/briandfoy/test-file/workflows/macos/badge.svg"></a> -=for HTML <a href="https://github.com/briandfoy/test-file/actions?query=workflow%3Aubuntu"><img src="https://github.com/briandfoy/test-file/workflows/ubuntu/badge.svg"></a> +=for HTML <a href="https://www.github.com/briandfoy/test-file/actions?query=workflow%3Aubuntu"><img src="https://www.github.com/briandfoy/test-file/workflows/ubuntu/badge.svg"></a> -=for HTML <a href="https://github.com/briandfoy/test-file/actions?query=workflow%3Awindows"><img src="https://github.com/briandfoy/test-file/workflows/windows/badge.svg"></a> +=for HTML <a href="https://www.github.com/briandfoy/test-file/actions?query=workflow%3Awindows"><img src="https://www.github.com/briandfoy/test-file/workflows/windows/badge.svg"></a> =for HTML <a href='https://ci.appveyor.com/project/briandfoy/test-file'><img src='https://ci.appveyor.com/api/projects/status/dbgen56rlgilgma5'></a> @@ -105,7 +105,7 @@ you diagnose your problem. You might like to read L<brian's Guide to Solving Any Perl -Problem|http://archive.oreilly.com/pub/a/perl/excerpts/9780596527242/brians-guide.html>. +Problem|https://briandfoy.github.io/brians-guide-to-solving-any-perl-problem/>. =head2 Copyright and License diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Test-File-1.444/lib/Test/File.pm new/Test-File-1.446/lib/Test/File.pm --- old/Test-File-1.444/lib/Test/File.pm 2021-01-06 04:42:30.000000000 +0100 +++ new/Test-File-1.446/lib/Test/File.pm 2021-02-20 22:18:53.000000000 +0100 @@ -30,7 +30,7 @@ file_mtime_gt_ok file_mtime_lt_ok file_mtime_age_ok ); -$VERSION = '1.444'; +$VERSION = '1.446'; my $Test = Test::Builder->new(); @@ -152,11 +152,11 @@ =item file_empty_ok( FILENAME [, NAME ] ) -Ok if the file exists and has empty size, not ok if the -file does not exist or exists with non-zero size. +Ok if the file exists and has empty size, not ok if the file does not +exist or exists with non-zero size. Previously this tried to test any sort of file. Sometime in the future -this will fail if the argument is not a plain file. +this will fail if the argument is not a plain file or is a directory. =cut @@ -173,6 +173,10 @@ $Test->diag( "File [$filename] is not a plain file, which is deprecated for file_empty_ok" ); } + if( -d $filename ) { + $Test->diag( "File [$filename] is a directory, which is deprecated for file_empty_ok" ); + } + my $ok = -z $filename; if( $ok ) { @@ -190,7 +194,7 @@ not exist or exists with zero size. Previously this tried to test any sort of file. Sometime in the future -this will fail if the argument is not a plain file. +this will fail if the argument is not a plain file or is a directory. =cut @@ -207,6 +211,10 @@ $Test->diag( "File [$filename] is a directory, which is deprecated for file_not_empty_ok" ); } + if( -d $filename ) { + $Test->diag( "File [$filename] is a directory, which is deprecated for file_not_empty_ok" ); + } + my $ok = not -z _; if( $ok ) { @@ -224,7 +232,7 @@ the file does not exist or exists with size other than SIZE. Previously this tried to test any sort of file. Sometime in the future -this will fail if the argument is not a plain file. +this will fail if the argument is not a plain file or is a directory. =cut @@ -242,6 +250,10 @@ $Test->diag( "File [$filename] is a directory, which is deprecated for file_size_ok" ); } + if( -d $filename ) { + $Test->diag( "File [$filename] is a directory, which is deprecated for file_size_ok" ); + } + my $ok = ( -s $filename ) == $expected; if( $ok ) { @@ -263,7 +275,7 @@ bytes. Previously this tried to test any sort of file. Sometime in the future -this will fail if the argument is not a plain file. +this will fail if the argument is not a plain file or is a directory. =cut @@ -281,6 +293,10 @@ $Test->diag( "File [$filename] is a directory, which is deprecated for file_max_size_ok" ); } + if( -d $filename ) { + $Test->diag( "File [$filename] is a directory, which is deprecated for file_max_size_ok" ); + } + my $ok = ( -s $filename ) <= $max; if( $ok ) { @@ -304,7 +320,7 @@ bytes. Previously this tried to test any sort of file. Sometime in the future -this will fail if the argument is not a plain file. +this will fail if the argument is not a plain file or is a directory. =cut @@ -322,6 +338,10 @@ $Test->diag( "File [$filename] is a directory, which is deprecated for file_min_size_ok" ); } + if( -d $filename ) { + $Test->diag( "File [$filename] is a directory, which is deprecated for file_min_size_ok" ); + } + my $ok = ( -s $filename ) >= $min; if( $ok ) { @@ -347,7 +367,7 @@ counts the lines by reading them and counting how many it read. Previously this tried to test any sort of file. Sometime in the future -this will fail if the argument is not a plain file. +this will fail if the argument is not a plain file or is a directory. =cut @@ -378,6 +398,14 @@ shift || "$filename line count is $expected lines"; }; + unless( ! -e $filename or -f $filename ) { + $Test->diag( "File [$filename] is not a plain file, which is deprecated for file_line_count_is" ); + } + + if( -d $filename ) { + $Test->diag( "File [$filename] is a directory, which is deprecated for file_line_count_is" ); + } + unless( defined $expected && int( $expected ) == $expected ) { no warnings 'uninitialized'; $Test->diag( "file_line_count_is expects a positive whole number for " . @@ -420,7 +448,7 @@ counts the lines by reading them and counting how many it read. Previously this tried to test any sort of file. Sometime in the future -this will fail if the argument is not a plain file. +this will fail if the argument is not a plain file or is a directory. =cut @@ -432,6 +460,14 @@ shift || "$filename line count is not $expected lines"; }; + unless( ! -e $filename or -f $filename ) { + $Test->diag( "File [$filename] is not a plain file, which is deprecated for file_line_count_isnt" ); + } + + if( -d $filename ) { + $Test->diag( "File [$filename] is a directory, which is deprecated for file_line_count_isnt" ); + } + unless( defined $expected && int( $expected ) == $expected ) { no warnings 'uninitialized'; $Test->diag( "file_line_count_is expects a positive whole number for " . @@ -473,7 +509,7 @@ counts the lines by reading them and counting how many it read. Previously this tried to test any sort of file. Sometime in the future -this will fail if the argument is not a plain file. +this will fail if the argument is not a plain file or is a directory. =cut @@ -482,6 +518,14 @@ my $min = shift; my $max = shift; + unless( ! -e $filename or -f $filename ) { + $Test->diag( "File [$filename] is not a plain file, which is deprecated for file_line_count_between" ); + } + + if( -d $filename ) { + $Test->diag( "File [$filename] is a directory, which is deprecated for file_line_count_between" ); + } + my $name = do { no warnings 'uninitialized'; shift || "$filename line count is between [$min] and [$max] lines"; @@ -657,7 +701,7 @@ return $Test->ok(0, $name); } - unless( -f $filename ) { + if( -d $filename ) { my $caller = ( caller(0) )[3]; $Test->diag( "File [$filename] is a directory, which is deprecated for $caller" ); } @@ -1708,7 +1752,7 @@ This module is in Github: - git://github.com/briandfoy/test-file.git + https://github.com/briandfoy/test-file.git =head1 AUTHOR diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Test-File-1.444/t/file_contains.t new/Test-File-1.446/t/file_contains.t --- old/Test-File-1.444/t/file_contains.t 2021-01-06 04:42:30.000000000 +0100 +++ new/Test-File-1.446/t/file_contains.t 2021-02-20 22:18:53.000000000 +0100 @@ -5,6 +5,8 @@ use Test::More 0.95; use Test::File; +use Config; + require "./t/setup_common"; # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # @@ -29,8 +31,9 @@ test_test(); SKIP: { -skip "Superuser has special privileges", 1, if( $> == 0 or $< == 0 ); -skip "Not possible to make file unreadable on MSYS2" if $^O eq 'msys'; +skip "Superuser has special privileges", 1 if is_unix_superuser(); +skip "Windows has a different idea of readable", 1 if is_win32(); +skip "Not possible to make file unreadable on MSYS or Cygwin", 1 if is_cygwin(); test_out( "not ok 1 - not_readable contains $pattern1" ); test_diag( 'File [not_readable] is not readable!' ); test_fail(+1); @@ -58,8 +61,9 @@ test_test(); SKIP: { -skip "Superuser has special privileges", 1, if( $> == 0 or $< == 0 ); -skip "Not possible to make file unreadable on MSYS2" if $^O eq 'msys'; +skip "Superuser has special privileges", 1 if is_unix_superuser(); +skip "Windows has a different idea of readable", 1 if is_win32(); +skip "Not possible to make file unreadable on MSYS or Cygwin", 1 if is_cygwin(); test_out( "not ok 1 - not_readable doesn't contain $bad_pattern" ); test_diag( 'File [not_readable] is not readable!' ); test_fail(+1); @@ -93,8 +97,9 @@ test_test(); SKIP: { -skip "Superuser has special privileges", 1, if( $> == 0 or $< == 0 ); -skip "Not possible to make file unreadable on MSYS2" if $^O eq 'msys'; +skip "Superuser has special privileges", 1 if is_unix_superuser(); +skip "Windows has a different idea of readable", 1 if is_win32(); +skip "Not possible to make file unreadable on MSYS or Cygwin", 1 if is_cygwin(); test_out( "not ok 1 - not_readable contains $pattern1" ); test_diag( 'File [not_readable] is not readable!' ); test_fail(+1); @@ -129,8 +134,9 @@ test_test(); SKIP: { -skip "Superuser has special privileges", 1, if( $> == 0 or $< == 0 ); -skip "Not possible to make file unreadable on MSYS2" if $^O eq 'msys'; +skip "Superuser has special privileges", 1 if is_unix_superuser(); +skip "Windows has a different idea of readable", 1 if is_win32(); +skip "Not possible to make file unreadable on MSYS or Cygwin", 1 if is_cygwin(); test_out( "not ok 1 - not_readable doesn't contain $bad_pattern" ); test_diag( 'File [not_readable] is not readable!' ); test_fail(+1); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Test-File-1.444/t/setup_common new/Test-File-1.446/t/setup_common --- old/Test-File-1.444/t/setup_common 2021-01-06 04:42:30.000000000 +0100 +++ new/Test-File-1.446/t/setup_common 2021-02-20 22:18:53.000000000 +0100 @@ -1,16 +1,27 @@ use strict; +use Test::More 1; + +use Config; use File::Temp qw(tempdir); -use Test::More 0.95; -my $dir = tempdir( CLEANUP => 1 ) or BAILOUT( "Could not setup temp directory" ); +sub is_unix_superuser () { + ($^O ne 'MSWin32' and ( $> == 0 or $< == 0 )) + or + ($^O eq 'cygwin' and grep { $_ == 544 } split /\s+/, `/usr/bin/id -G`) + } +sub is_cygwin () { scalar grep { lc($^O) eq $_ or lc($Config{osname}) eq $_ } qw( cygwin msys msys2 ) } + +sub is_win32 () { $^O eq 'MSWin32' } + +my $dir = tempdir( CLEANUP => 1 ) or BAIL_OUT( "Could not setup temp directory" ); unless( -d $dir ) { mkdir 'test_files', 0700 - or BAILOUT( "Could not make directory! $!" ); + or BAIL_OUT( "Could not make directory! $!" ); } -chdir $dir or BAILOUT( "Could not change directory! $!" ); +chdir $dir or BAIL_OUT( "Could not change directory! $!" ); my @files = qw( max_file non_zero_file not_readable readable zero_file @@ -25,23 +36,23 @@ { my $count = chmod 0644, @files; -is( $count, scalar @files ) or BAILOUT( "Could not make files readable" ); +is( $count, scalar @files ) or BAIL_OUT( "Could not make files readable" ); } { my $count = chmod 0400, 'readable', 'not_writable', 'not_executable'; -is( $count, 3 ) or BAILOUT( "Could not make files readable" ); +is( $count, 3 ) or BAIL_OUT( "Could not make files readable" ); } { my $count = chmod 0200, 'writable', 'not_readable', 'zero_file', 'max_file', 'non_zero_file'; -is( $count, 5 ) or BAILOUT( "Could not make files writable" ); +is( $count, 5 ) or BAIL_OUT( "Could not make files writable" ); } { my $count = chmod 0100, 'executable'; -is( $count, 1 ) or BAILOUT( "Could not make files executable" ); +is( $count, 1 ) or BAIL_OUT( "Could not make files executable" ); } truncate 'zero_file', 0; @@ -49,11 +60,11 @@ truncate 'min_file', 0; { -open FH, '> min_file' or BAILOUT( "Could not write to min_file: $!" ); +open FH, '> min_file' or BAIL_OUT( "Could not write to min_file: $!" ); binmode FH; #, Windows, yo! print FH 'x' x 40, $/, 'x' x 11, $/; close FH; } is( -s 'min_file', 51 + 2 * length( $/ ) ); -mkdir 'sub_dir', 0755 or BAILOUT( "Could not cerate subdir: $!" ); +mkdir 'sub_dir', 0755 or BAIL_OUT( "Could not cerate subdir: $!" ); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Test-File-1.444/t/test_files.t new/Test-File-1.446/t/test_files.t --- old/Test-File-1.444/t/test_files.t 2021-01-06 04:42:30.000000000 +0100 +++ new/Test-File-1.446/t/test_files.t 2021-02-20 22:18:53.000000000 +0100 @@ -4,6 +4,8 @@ use Test::More 0.95; use Test::File; +use Config; + =pod max_file non_zero_file not_readable readable zero_file @@ -67,7 +69,7 @@ }; subtest readable_fails => sub { SKIP: { - skip "Superuser has special privileges", 2, if( $> == 0 or $< == 0 ); + skip "Superuser has special privileges", 2, is_unix_superuser(); test_out( 'not ok 1 - writeable is readable' ); test_diag("File [writeable] is not readable!"); test_diag(" Failed test 'writeable is readable'"); @@ -79,8 +81,8 @@ subtest not_readable_fails => sub { SKIP: { - skip "Superuser has special privileges", 3, if( $> == 0 or $< == 0 ); - skip "Not possible to make file unreadable on MSYS2" if $^O eq 'msys'; + skip "Superuser has special privileges", 3, if is_unix_superuser(); + skip "Not possible to make file unreadable on MSYS or Cygwin" if is_cygwin(); test_out( 'ok 1 - writeable is not readable' ); file_not_readable_ok( 'writeable' ); test_out( 'ok 2 - writeable really is not readable' ); @@ -100,7 +102,7 @@ file_writable_ok( 'writable' ); test_out( "ok 2 - $label" ); file_writable_ok( 'writable', $label ); - if( ($^O ne 'MSWin32') && ($> == 0 or $< == 0 )) { + if( is_cygwin() or is_unix_superuser() ) { test_out( 'ok 3 - readable is writable' ); } else { @@ -115,8 +117,8 @@ }; subtest not_writable => sub { SKIP: { - skip "Superuser has special privileges", 1, if( $> == 0 or $< == 0 ); - skip "Not possible to make file unreadable on MSYS2" if $^O eq 'msys'; + skip "Superuser has special privileges", 1, if is_unix_superuser(); + skip "Not possible to make file unreadable on MSYS or Cygwin" if is_cygwin(); test_out( 'ok 1 - readable is not writable' ); test_out( 'not ok 2 - writable is not writable' ); test_diag('File [writable] is writable!');