aports/testing/perl-git-raw/libgit2-version-tests.patch
Celeste 640a66b2c4 testing/perl-git-raw: new aport
https://metacpan.org/release/Git-Raw/
Perl bindings to the Git linkable library (libgit2)
2024-02-05 11:42:01 +00:00

64 lines
1.7 KiB
Diff

Patch-Source: https://sources.debian.org/data/main/libg/libgit-raw-perl/0.90+ds-2/debian/patches/libgit2-version-tests
--
Description: fix failing test
Patch out the expected libgit2 version from the test,
as the system library can have a different version.
Origin: vendor
Bug-Debian: https://bugs.debian.org/906482
Forwarded: not-needed, cf. debian/patches/remove-convenience-libs
Author: gregor herrmann <gregoa@debian.org>
Last-Update: 2022-10-29
--- a/t/02-commit.t
+++ b/t/02-commit.t
@@ -231,6 +231,7 @@
my $commit2_id = $commit2 -> id;
my $patch = "\n".join("\n", grep { $_ !~ /^Date/ } split (/\n/, $commit2 -> as_email))."\n";
+$patch =~ s/(libgit2) [0-9.]+/$1/;
my $expected_patch = qq{
From $commit2_id Mon Sep 17 00:00:00 2001
From: Git::Raw author <git-xs\@example.com>
@@ -250,7 +251,7 @@
+this is a second test
\\ No newline at end of file
--
-libgit2 1.5.0
+libgit2
};
is $patch, $expected_patch;
@@ -261,6 +262,7 @@
};
$patch = "\n".join("\n", grep { $_ !~ /^Date/ } split (/\n/, $commit2 -> as_email($email_opts, {})))."\n";
+$patch =~ s/(libgit2) [0-9.]+/$1/;
$expected_patch = qq{
From $commit2_id Mon Sep 17 00:00:00 2001
From: Git::Raw author <git-xs\@example.com>
@@ -280,7 +282,7 @@
+this is a second test
\\ No newline at end of file
--
-libgit2 1.5.0
+libgit2
};
is $patch, $expected_patch;
@@ -290,6 +292,7 @@
};
$patch = "\n".join("\n", grep { $_ !~ /^Date/ } split (/\n/, $commit2 -> as_email($email_opts)))."\n";
+$patch =~ s/(libgit2) [0-9.]+/$1/;
$expected_patch = qq{
From $commit2_id Mon Sep 17 00:00:00 2001
From: Git::Raw author <git-xs\@example.com>
@@ -309,7 +312,7 @@
+this is a second test
\\ No newline at end of file
--
-libgit2 1.5.0
+libgit2
};
is $patch, $expected_patch;