File: 06flag.t

package info (click to toggle)
libtest-utf8-perl 1.00-1
  • links: PTS
  • area: main
  • in suites: wheezy
  • size: 208 kB
  • sloc: perl: 1,658; makefile: 2
file content (51 lines) | stat: -rw-r--r-- 1,114 bytes parent folder | download | duplicates (4)
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
48
49
50
51
#!/usr/bin/perl

use strict;
use warnings;

use Test::More tests => 9;
use Test::Builder::Tester;
use Test::utf8;

test_out("ok 1 - flagged as utf8");
is_flagged_utf8("\x{300}");
test_test("is flagged pass");

test_out("ok 1 - foo");
is_flagged_utf8("\x{300}","foo");
test_test("is flagged pass with name");

test_out("not ok 1 - flagged as utf8");
test_fail(+1);
is_flagged_utf8("\x{e9}");
test_test("is flagged fail");

#################

test_out("ok 1 - not flagged as utf8");
isnt_flagged_utf8("fred");
test_test("isnt flagged pass");

test_out("ok 1 - foo");
isnt_flagged_utf8("fred","foo");
test_test("isnt flagged pass with name");

test_out("not ok 1 - not flagged as utf8");
test_fail(+1);
isnt_flagged_utf8("\x{400}");
test_test("isnt flagged fail");

######################

test_out("ok 1 - not flagged as utf8");
isn't_flagged_utf8("fred");
test_test("isn't flagged pass");

test_out("ok 1 - foo");
isn't_flagged_utf8("fred","foo");
test_test("isn't flagged pass with name");

test_out("not ok 1 - not flagged as utf8");
test_fail(+1);
isn't_flagged_utf8("\x{400}");
test_test("isn't flagged fail");