From 316c59c3e3f7a70d22275241f57da080fbed90d3 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Tue, 22 Jul 2025 15:44:13 +0200 Subject: [PATCH] Bug 40467: Remove t/00-deprecated.t MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit it only tests for the presence of "switch" Signed-off-by: David Nind Signed-off-by: Tomás Cohen Arazi Signed-off-by: Lucas Gass (cherry picked from commit d996664353ec3e336289f8cf47d597b0fb4df7b1) Signed-off-by: Paul Derscheid --- t/00-deprecated.t | 31 ------------------------------- 1 file changed, 31 deletions(-) delete mode 100755 t/00-deprecated.t diff --git a/t/00-deprecated.t b/t/00-deprecated.t deleted file mode 100755 index 0131992ca1..0000000000 --- a/t/00-deprecated.t +++ /dev/null @@ -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 ) ); -