1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51
|
Description: enable smoke tests under autopkgtest
Return installed script name, and update regexps to cope with
leading /usr/bin.
Origin: vendor
Forwarded: not-needed
Author: gregor herrmann <gregoa@debian.org>
Last-Update: 2023-01-23
--- a/t/File-Rename-V.t
+++ b/t/File-Rename-V.t
@@ -33,7 +33,7 @@
END{
close $stdout or diag $!;
like( $buffer, qr{
- \b $script
+ \b? $script
\s+ using
\s+ (\w+\:\:)+Rename
\s+ version
--- a/t/File-Rename-script.t
+++ b/t/File-Rename-script.t
@@ -21,7 +21,7 @@
SKIP: {
skip "script may be in blib/bin", 1 if $] < 5.008009;
- like( $INC{$script}, qr{/ $script \z}msx, "required $script in \%INC");
+ like( $INC{$script}, qr{/? $script \z}msx, "required $script in \%INC");
}
#########################
--- a/t/rename-examples.t
+++ b/t/rename-examples.t
@@ -48,7 +48,7 @@
# for help writing this test script.
plan tests => 2 + ((@examples * 2) || 1);
-like( $inc_script, qr{/ $script \z}msx,
+like( $inc_script, qr{/? $script \z}msx,
"required $script is $inc_script");
ok( scalar(@examples) > 1,
"enough examples in $inc_script" );
--- a/t/testlib.pl
+++ b/t/testlib.pl
@@ -138,6 +138,7 @@
}
sub script_name {
+ return '/usr/bin/file-rename' if $ENV{AUTOPKGTEST_TMP};
return +( is_windows() ? 'file-rename' : 'rename' );
}
|