File: sort-hash-query-form.t

package info (click to toggle)
liburi-perl 5.30-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 948 kB
  • sloc: perl: 3,936; makefile: 4
file content (22 lines) | stat: -rw-r--r-- 354 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
use strict;
use warnings;

use Test::More;

# ABSTRACT: Make sure query_form(\%hash) is sorted

use URI ();

my $base = URI->new('http://example.org/');

my $i = 1;

my $hash = { map { $_ => $i++ } qw( a b c d e f ) };

$base->query_form($hash);

is("$base","http://example.org/?a=1&b=2&c=3&d=4&e=5&f=6", "Query parameters are sorted");

done_testing;