diff options
3 files changed, 166 insertions, 0 deletions
diff --git a/meta-perl/conf/include/ptest-packagelists-meta-perl.inc b/meta-perl/conf/include/ptest-packagelists-meta-perl.inc index 842f817f1f..9fc5e9675a 100644 --- a/meta-perl/conf/include/ptest-packagelists-meta-perl.inc +++ b/meta-perl/conf/include/ptest-packagelists-meta-perl.inc | |||
@@ -21,6 +21,7 @@ PTESTS_FAST_META_PERL = "\ | |||
21 | libterm-readkey-perl \ | 21 | libterm-readkey-perl \ |
22 | libtest-nowarnings-perl \ | 22 | libtest-nowarnings-perl \ |
23 | libtext-diff-perl \ | 23 | libtext-diff-perl \ |
24 | liburi-perl \ | ||
24 | " | 25 | " |
25 | 26 | ||
26 | PTESTS_SLOW_META_PERL = "\ | 27 | PTESTS_SLOW_META_PERL = "\ |
diff --git a/meta-perl/recipes-perl/liburi/liburi-perl/0001-Skip-TODO-test-cases-that-fail.patch b/meta-perl/recipes-perl/liburi/liburi-perl/0001-Skip-TODO-test-cases-that-fail.patch new file mode 100644 index 0000000000..c15c3be93a --- /dev/null +++ b/meta-perl/recipes-perl/liburi/liburi-perl/0001-Skip-TODO-test-cases-that-fail.patch | |||
@@ -0,0 +1,109 @@ | |||
1 | From c424e6118d3bd836939ce39c70ee9e6bbd984028 Mon Sep 17 00:00:00 2001 | ||
2 | From: Tim Orling <tim.orling@konsulko.com> | ||
3 | Date: Thu, 17 Nov 2022 16:33:20 -0800 | ||
4 | Subject: [PATCH] Skip TODO test cases that fail | ||
5 | |||
6 | TODO cases report as "not ok" with ptest-runner | ||
7 | |||
8 | Upstream-Status: Inappropriate [ptest-runner specific] | ||
9 | |||
10 | Signed-off-by: Tim Orling <tim.orling@konsulko.com> | ||
11 | --- | ||
12 | t/escape-char.t | 20 ++++++++++---------- | ||
13 | t/iri.t | 18 +++++++++--------- | ||
14 | t/mailto.t | 12 ++++++------ | ||
15 | 3 files changed, 25 insertions(+), 25 deletions(-) | ||
16 | |||
17 | diff --git a/t/escape-char.t b/t/escape-char.t | ||
18 | index c6ce79c..5e62ad5 100644 | ||
19 | --- a/t/escape-char.t | ||
20 | +++ b/t/escape-char.t | ||
21 | @@ -6,16 +6,16 @@ use warnings; | ||
22 | use Test::More; | ||
23 | use URI (); | ||
24 | |||
25 | -TODO: { | ||
26 | - my $str = "http://foo/\xE9"; | ||
27 | - utf8::upgrade($str); | ||
28 | - my $uri = URI->new($str); | ||
29 | - | ||
30 | - local $TODO = 'URI::Escape::escape_char misunderstands utf8'; | ||
31 | - | ||
32 | - # http://foo/%C3%A9 | ||
33 | - is("$uri", 'http://foo/%E9', 'correctly created a URI from a utf8-upgraded string'); | ||
34 | -} | ||
35 | +#TODO: { | ||
36 | +# my $str = "http://foo/\xE9"; | ||
37 | +# utf8::upgrade($str); | ||
38 | +# my $uri = URI->new($str); | ||
39 | +# | ||
40 | +# local $TODO = 'URI::Escape::escape_char misunderstands utf8'; | ||
41 | +# | ||
42 | +# # http://foo/%C3%A9 | ||
43 | +# is("$uri", 'http://foo/%E9', 'correctly created a URI from a utf8-upgraded string'); | ||
44 | +#} | ||
45 | |||
46 | { | ||
47 | my $str = "http://foo/\xE9"; | ||
48 | diff --git a/t/iri.t b/t/iri.t | ||
49 | index cf983d6..884b36e 100644 | ||
50 | --- a/t/iri.t | ||
51 | +++ b/t/iri.t | ||
52 | @@ -6,7 +6,7 @@ use Test::More; | ||
53 | use Config qw( %Config ); | ||
54 | |||
55 | if (defined $Config{useperlio}) { | ||
56 | - plan tests=>30; | ||
57 | + plan tests=>28; | ||
58 | } else { | ||
59 | plan skip_all=>"this perl doesn't support PerlIO layers"; | ||
60 | } | ||
61 | @@ -67,17 +67,17 @@ is $u->as_iri, "http://➡.ws/"; | ||
62 | # draft-duerst-iri-bis.txt examples (section 3.7.1): | ||
63 | is(URI->new("http://www.example.org/D%C3%BCrst")->as_iri, "http://www.example.org/D\xFCrst"); | ||
64 | is(URI->new("http://www.example.org/D%FCrst")->as_iri, "http://www.example.org/D%FCrst"); | ||
65 | -TODO: { | ||
66 | - local $TODO = "some chars (like U+202E, RIGHT-TO-LEFT OVERRIDE) need to stay escaped"; | ||
67 | -is(URI->new("http://xn--99zt52a.example.org/%e2%80%ae")->as_iri, "http://\x{7D0D}\x{8C46}.example.org/%e2%80%ae"); | ||
68 | -} | ||
69 | +#TODO: { | ||
70 | +# local $TODO = "some chars (like U+202E, RIGHT-TO-LEFT OVERRIDE) need to stay escaped"; | ||
71 | +#is(URI->new("http://xn--99zt52a.example.org/%e2%80%ae")->as_iri, "http://\x{7D0D}\x{8C46}.example.org/%e2%80%ae"); | ||
72 | +#} | ||
73 | |||
74 | # try some URLs that can't be IDNA encoded (fallback to encoded UTF8 bytes) | ||
75 | $u = URI->new("http://" . ("ü" x 128)); | ||
76 | is $u, "http://" . ("%C3%BC" x 128); | ||
77 | is $u->host, ("\xC3\xBC" x 128); | ||
78 | -TODO: { | ||
79 | - local $TODO = "should ihost decode UTF8 bytes?"; | ||
80 | - is $u->ihost, ("ü" x 128); | ||
81 | -} | ||
82 | +#TODO: { | ||
83 | +# local $TODO = "should ihost decode UTF8 bytes?"; | ||
84 | +# is $u->ihost, ("ü" x 128); | ||
85 | +#} | ||
86 | is $u->as_iri, "http://" . ("ü" x 128); | ||
87 | diff --git a/t/mailto.t b/t/mailto.t | ||
88 | index 79e9a13..c68cfb2 100644 | ||
89 | --- a/t/mailto.t | ||
90 | +++ b/t/mailto.t | ||
91 | @@ -48,12 +48,12 @@ $u = URI->new('mailto:user+detail@example.com'); | ||
92 | is $u->to, 'user+detail@example.com', 'subaddress with `+` parsed correctly'; | ||
93 | is $u, 'mailto:user+detail@example.com', '... and stringification works'; | ||
94 | |||
95 | -TODO: { | ||
96 | - local $TODO = "We can't handle quoted local parts without properly parsing the email addresses"; | ||
97 | - $u = URI->new('mailto:"foo bar+baz"@example.com'); | ||
98 | - is $u->to, '"foo bar+baz"@example.com', 'address with quoted local part containing spaces is parsed correctly'; | ||
99 | - is $u, 'mailto:%22foo%20bar+baz%22@example.com', '... and stringification works'; | ||
100 | -} | ||
101 | +#TODO: { | ||
102 | +# local $TODO = "We can't handle quoted local parts without properly parsing the email addresses"; | ||
103 | +# $u = URI->new('mailto:"foo bar+baz"@example.com'); | ||
104 | +# is $u->to, '"foo bar+baz"@example.com', 'address with quoted local part containing spaces is parsed correctly'; | ||
105 | +# is $u, 'mailto:%22foo%20bar+baz%22@example.com', '... and stringification works'; | ||
106 | +#} | ||
107 | |||
108 | # RFC 5321 (4.1.3) - Address Literals | ||
109 | |||
diff --git a/meta-perl/recipes-perl/liburi/liburi-perl_5.31.bb b/meta-perl/recipes-perl/liburi/liburi-perl_5.31.bb new file mode 100644 index 0000000000..e23942b81e --- /dev/null +++ b/meta-perl/recipes-perl/liburi/liburi-perl_5.31.bb | |||
@@ -0,0 +1,56 @@ | |||
1 | SUMMARY = "Perl module to manipulate and access URI strings" | ||
2 | DESCRIPTION = "This package contains the URI.pm module with friends. \ | ||
3 | The module implements the URI class. URI objects can be used to access \ | ||
4 | and manipulate the various components that make up these strings." | ||
5 | HOMEPAGE = "https://metacpan.org/dist/URI" | ||
6 | SECTION = "libs" | ||
7 | LICENSE = "Artistic-1.0 | GPL-1.0-or-later" | ||
8 | |||
9 | LIC_FILES_CHKSUM = "file://LICENSE;md5=9944b87af51186f848ae558344aded9f" | ||
10 | |||
11 | SRC_URI = "${CPAN_MIRROR}/authors/id/O/OA/OALDERS/URI-${PV}.tar.gz \ | ||
12 | file://0001-Skip-TODO-test-cases-that-fail.patch \ | ||
13 | " | ||
14 | |||
15 | SRC_URI[sha256sum] = "b9c4d58b2614b8611ae03a95a6d60ed996f4b311ef3cd5a937b92f1825ecc564" | ||
16 | |||
17 | S = "${WORKDIR}/URI-${PV}" | ||
18 | |||
19 | EXTRA_CPANFLAGS = "EXPATLIBPATH=${STAGING_LIBDIR} EXPATINCPATH=${STAGING_INCDIR}" | ||
20 | |||
21 | inherit cpan ptest-perl | ||
22 | |||
23 | do_compile() { | ||
24 | export LIBC="$(find ${STAGING_DIR_TARGET}/${base_libdir}/ -name 'libc-*.so')" | ||
25 | cpan_do_compile | ||
26 | } | ||
27 | |||
28 | do_install:prepend() { | ||
29 | # these tests require "-T" (taint) command line option | ||
30 | rm -rf ${B}/t/cwd.t | ||
31 | rm -rf ${B}/t/file.t | ||
32 | } | ||
33 | |||
34 | RDEPENDS:${PN} += "\ | ||
35 | perl-module-integer \ | ||
36 | perl-module-mime-base64 \ | ||
37 | " | ||
38 | |||
39 | RDEPENDS:${PN}-ptest += " \ | ||
40 | libtest-fatal-perl \ | ||
41 | libtest-needs-perl \ | ||
42 | libtest-warnings-perl \ | ||
43 | perl-module-encode \ | ||
44 | perl-module-encode-encoding \ | ||
45 | perl-module-extutils-makemaker \ | ||
46 | perl-module-extutils-mm-unix \ | ||
47 | perl-module-file-spec-functions \ | ||
48 | perl-module-net-domain \ | ||
49 | perl-module-perlio \ | ||
50 | perl-module-perlio-encoding \ | ||
51 | perl-module-test \ | ||
52 | perl-module-test-more \ | ||
53 | perl-module-utf8 \ | ||
54 | " | ||
55 | |||
56 | BBCLASSEXTEND = "native" | ||