File: 04ascii.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 (22 lines) | stat: -rw-r--r-- 463 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
#!/usr/bin/perl

use strict;
use warnings;

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

test_out("ok 1 - within ascii");
is_within_ascii("foo");
test_test("within ascii");

test_out("ok 1 - bar");
is_within_ascii("foo","bar");
test_test("within ascii name");

test_out("not ok 1 - within ascii");
test_fail(+2);
test_diag("Char 4 not ASCII (it's 233 dec / e9 hex)");
is_within_ascii("foo\x{e9} foo");
test_test("within ascii failure");