File: gh-155.t

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

use CGI;

for (1 .. 20) {
    my $q = CGI->new;

    my %args = (
        '-charset'      => 'UTF-8',
        '-type'         => 'text/html',
        '-content-type' => 'text/html; charset=iso-8859-1',
    );

    like(
		$q->header(%args),
		qr!Content-Type: text/html; charset=iso-8859-1!,
		'favour content type over charset/type'
	);
}

done_testing();