File: 02_usebytes.t

package info (click to toggle)
libfilter-template-perl 1.043-3
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 172 kB
  • sloc: perl: 870; makefile: 2
file content (22 lines) | stat: -rw-r--r-- 444 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
#!/usr/bin/perl -w
# vim: filetype=perl

use strict;

use Test::More tests => 2;

use Filter::Template ( isa => "Filter::Template::UseBytes" );

SKIP: {
	skip("this version of perl is too old for C<use bytes>", 2)
		unless &Filter::Template::UseBytes::HAS_BYTES;

	# Hi, Phi!
	my $test_string = chr(0x618);
	ok(length($test_string) == 1, "Phi is one character");

	{% use_bytes %}
	ok(length($test_string) == 2, "Phi is two bytes");
}

exit 0;