projects/aports·blob master · refs

64 lines · 1.7 KiB

1Patch-Source: https://sources.debian.org/data/main/libg/libgit-raw-perl/0.90+ds-2/debian/patches/libgit2-version-tests
2--
3Description: fix failing test
4 Patch out the expected libgit2 version from the test,
5 as the system library can have a different version.
6Origin: vendor
7Bug-Debian: https://bugs.debian.org/906482
8Forwarded: not-needed, cf. debian/patches/remove-convenience-libs
9Author: gregor herrmann <[email protected]>
10Last-Update: 2022-10-29
11
12--- a/t/02-commit.t
13+++ b/t/02-commit.t
14@@ -231,6 +231,7 @@
15
16 my $commit2_id = $commit2 -> id;
17 my $patch = "\n".join("\n", grep { $_ !~ /^Date/ } split (/\n/, $commit2 -> as_email))."\n";
18+$patch =~ s/(libgit2) [0-9.]+/$1/;
19 my $expected_patch = qq{
20 From $commit2_id Mon Sep 17 00:00:00 2001
21 From: Git::Raw author <git-xs\@example.com>
22@@ -250,7 +251,7 @@
23 +this is a second test
24 \\ No newline at end of file
25 --
26-libgit2 1.5.0
27+libgit2
28 };
29
30 is $patch, $expected_patch;
31@@ -261,6 +262,7 @@
32 };
33
34 $patch = "\n".join("\n", grep { $_ !~ /^Date/ } split (/\n/, $commit2 -> as_email($email_opts, {})))."\n";
35+$patch =~ s/(libgit2) [0-9.]+/$1/;
36 $expected_patch = qq{
37 From $commit2_id Mon Sep 17 00:00:00 2001
38 From: Git::Raw author <git-xs\@example.com>
39@@ -280,7 +282,7 @@
40 +this is a second test
41 \\ No newline at end of file
42 --
43-libgit2 1.5.0
44+libgit2
45 };
46
47 is $patch, $expected_patch;
48@@ -290,6 +292,7 @@
49 };
50
51 $patch = "\n".join("\n", grep { $_ !~ /^Date/ } split (/\n/, $commit2 -> as_email($email_opts)))."\n";
52+$patch =~ s/(libgit2) [0-9.]+/$1/;
53 $expected_patch = qq{
54 From $commit2_id Mon Sep 17 00:00:00 2001
55 From: Git::Raw author <git-xs\@example.com>
56@@ -309,7 +312,7 @@
57 +this is a second test
58 \\ No newline at end of file
59 --
60-libgit2 1.5.0
61+libgit2
62 };
63
64 is $patch, $expected_patch;