Bug 40467: Remove t/00-deprecated.t

it only tests for the presence of "switch"

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Tomás Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit d996664353)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This commit is contained in:
Jonathan Druart 2025-07-22 15:44:13 +02:00 committed by Paul Derscheid
parent eb8b5e60cb
commit 316c59c3e3
No known key found for this signature in database
GPG Key ID: C25F9FD44CED595B
1 changed files with 0 additions and 31 deletions

View File

@ -1,31 +0,0 @@
#!/usr/bin/perl
#
# Tests usage of deprecated Perl syntax. Deprecated could be extended to the
# sense of 'not allowed'.
#
use warnings;
use strict;
use Test::NoWarnings;
use Test::More tests => 2;
use File::Find;
use Cwd;
my @files_with_switch = do {
my @files;
local $/ = undef;
find(
sub {
my $dir = getcwd();
return if $dir =~ /blib/;
return unless /\.(pl|pm)$/; # Don't inspect non-Perl files
open my $fh, "<", $_;
my $content = <$fh>;
push @files, "$dir/$_" if $content =~ /switch\s*\(.*{/;
},
('.')
);
@files;
};
ok( !@files_with_switch, "Perl syntax: no use of switch statement" )
or diag( "Files list: " . join( ', ', @files_with_switch ) );