]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
maint: tests: update deprecated perl backreference syntax
authorDaniel Hofstetter <dhofstet@gmail.com>
Mon, 16 Dec 2024 18:11:01 +0000 (18:11 +0000)
committerPádraig Brady <P@draigBrady.com>
Mon, 16 Dec 2024 18:14:36 +0000 (18:14 +0000)
* tests/basenc/basenc.pl: perl warns that $1 is better than \1,
so update to the preferred form.

tests/basenc/basenc.pl

index 79337f6f8e9e8c76c623634ad0561d377a05bc6a..44e22ed0629563df0fd1c0f9753a771dbb7444f7 100755 (executable)
@@ -34,7 +34,7 @@ my $base64_out = "VA/c8A+vSg==";
 my $base64url_out = $base64_out;
 $base64url_out =~ y|+/|-_|;
 my $base64url_out_nl = $base64url_out;
-$base64url_out_nl =~ s/(..)/\1\n/g; # add newline every two characters
+$base64url_out_nl =~ s/(..)/$1\n/g; # add newline every two characters
 
 
 # Bug 49741:
@@ -57,7 +57,7 @@ $x = $base32_out2;
 $x =~ y|ABCDEFGHIJKLMNOPQRSTUVWXYZ234567|0123456789ABCDEFGHIJKLMNOPQRSTUV|;
 my $base32hex_out2 = $x;
 my $base32hex_out2_nl = $x;
-$base32hex_out2_nl =~ s/(...)/\1\n/g; # Add newline every 3 characters
+$base32hex_out2_nl =~ s/(...)/$1\n/g; # Add newline every 3 characters
 
 my $base16_in = "\xfd\xd8\x07\xd1\xa5";
 my $base16_out = "FDD807D1A5";
@@ -67,10 +67,10 @@ my $z85_out = 'HelloWorld';
 
 my $base2lsbf_ab = "1000011001000110";
 my $base2lsbf_ab_nl = $base2lsbf_ab;
-$base2lsbf_ab_nl =~ s/(...)/\1\n/g; # Add newline every 3 characters
+$base2lsbf_ab_nl =~ s/(...)/$1\n/g; # Add newline every 3 characters
 my $base2msbf_ab = "0110000101100010";
 my $base2msbf_ab_nl = $base2msbf_ab;
-$base2msbf_ab_nl =~ s/(...)/\1\n/g; # Add newline every 3 characters
+$base2msbf_ab_nl =~ s/(...)/$1\n/g; # Add newline every 3 characters
 
 my $try_help = "Try '$prog --help' for more information.\n";