Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

perl-uri/5.30 package update #30368

Merged
merged 2 commits into from
Oct 9, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 45 additions & 2 deletions perl-uri.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package:
name: perl-uri
version: "5.29"
version: "5.30"
epoch: 0
description: Uniform Resource Identifiers (absolute and relative)
copyright:
Expand All @@ -20,7 +20,7 @@ environment:
pipeline:
- uses: fetch
with:
expected-sha512: b086e3e1b5f13362a9c49f99888773d76ca2d042ff0a0f73650f1e4e76be0d04a6e78206ec8dd4d3098a5bdc9daacfe4ba8779b08f79203bbe45b6ef240852eb
expected-sha512: 054c0ef59b1eb017e28dff9774b869b700b5cfe7234e2e7e37c70fe5d786459675e4d7600d84b785cf199e0b71e6e7d4490f00b6377044448e2637c2129858d8
uri: https://cpan.metacpan.org/authors/id/O/OA/OALDERS/URI-${{package.version}}.tar.gz

- uses: perl/make
Expand All @@ -43,3 +43,46 @@ update:
enabled: true
release-monitor:
identifier: 3485

test:
environment:
contents:
packages:
- perl
- perl-uri
pipeline:
- name: Verify Installation
runs: |
# Check if the URI module can be imported in Perl
perl -MURI -e 'print "URI module is installed\n"' || exit 1
echo "perl-uri package is installed."
- name: Test URI Creation
runs: |
# Test creating a simple URI and checking its components
perl -MURI -e '
my $uri = URI->new("http://example.com:8080/foo/bar?query=123#fragment");
die "Scheme is incorrect" unless $uri->scheme eq "http";
die "Host is incorrect" unless $uri->host eq "example.com";
die "Port is incorrect" unless $uri->port == 8080;
die "Path is incorrect" unless $uri->path eq "/foo/bar";
die "Query is incorrect" unless $uri->query eq "query=123";
die "Fragment is incorrect" unless $uri->fragment eq "fragment";
print "URI creation and component checks passed.\n";'
- name: Test Relative URI Resolution
runs: |
# Test resolving a relative URI against a base URI
perl -MURI -e '
my $base_uri = URI->new("http://example.com/foo/");
my $rel_uri = URI->new("bar.html");
my $abs_uri = $rel_uri->abs($base_uri);
die "Resolved URI is incorrect" unless $abs_uri eq "http://example.com/foo/bar.html";
print "Relative URI resolution passed.\n";'
- name: Test URI Query Parameter Parsing
runs: |
# Test parsing and modifying query parameters
perl -MURI -e '
my $uri = URI->new("http://example.com/foo?name=John&age=30");
my %query = $uri->query_form;
die "Name is incorrect" unless $query{name} eq "John";
die "Age is incorrect" unless $query{age} == 30;
print "Query parameter parsing passed.\n";'