/
06-content.t6
47 lines (29 loc) · 1.33 KB
/
06-content.t6
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
use Test;
use Test::When <author>;
use LibCurl::Easy;
my $version = LibCurl::Easy.version;
my $curl = LibCurl::Easy.new(URL => 'http://test.greenbytes.de/tech/tc/httpcontenttype/textplainutf8.asis')
.perform;
is $curl.content, "Umlaute: äöüÄÖÜ Euro: €\n",
'Check decoded content, charset=UTF-8';
$curl.URL('http://test.greenbytes.de/tech/tc/httpcontenttype/textplainutf8qs.asis')
.perform;
is $curl.content, "Umlaute: äöüÄÖÜ Euro: €\n",
'Check decoded content, charset="UTF-8"';
$curl.URL('http://test.greenbytes.de/tech/tc/httpcontenttype/textplainutf8ws.asis')
.perform;
is $curl.content, "Umlaute: äöüÄÖÜ Euro: €\n",
'Check decoded content, charset = UTF-8';
$curl.URL('http://test.greenbytes.de/tech/tc/httpcontenttype/textplainutf8qsa.asis')
.perform;
is $curl.content, "Umlaute: äöüÄÖÜ Euro: €\n",
"Check decoded content, charset='UTF-8'";
$curl.URL('http://test.greenbytes.de/tech/tc/httpcontenttype/textplainutf8extparam.asis')
.perform;
is $curl.content, "Umlaute: äöüÄÖÜ Euro: €\n",
'Check decoded content, charset="UTF-8"';
$curl.URL('http://test.greenbytes.de/tech/tc/httpcontenttype/textplainutf8extparamqs1.asis')
.perform;
is $curl.content, "Umlaute: äöüÄÖÜ Euro: €\n",
'Check decoded content, charset=\"UTF-8\"';
done-testing;