This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
t/loc_tools.pl: Remove debug line
[perl5.git] / dist / Devel-PPPort / t / pv_tools.t
CommitLineData
db42c902
MHM
1################################################################################
2#
3# !!!!! Do NOT edit this file directly! !!!!!
4#
5# Edit mktests.PL and/or parts/inc/pv_tools instead.
6#
7# This file was automatically generated from the definition files in the
8# parts/inc/ subdirectory by mktests.PL. To learn more about how all this
9# works, please read the F<HACKERS> file that came with this distribution.
10#
11################################################################################
12
13BEGIN {
14 if ($ENV{'PERL_CORE'}) {
15 chdir 't' if -d 't';
0ff33da8 16 @INC = ('../lib', '../ext/Devel-PPPort/t') if -d '../lib' && -d '../ext';
db42c902
MHM
17 require Config; import Config;
18 use vars '%Config';
19 if (" $Config{'extensions'} " !~ m[ Devel/PPPort ]) {
20 print "1..0 # Skip -- Perl configured without Devel::PPPort module\n";
21 exit 0;
22 }
23 }
24 else {
25 unshift @INC, 't';
26 }
27
28 sub load {
29 eval "use Test";
30 require 'testutil.pl' if $@;
31 }
32
33 if (13) {
34 load();
35 plan(tests => 13);
36 }
37}
38
39use Devel::PPPort;
40use strict;
41$^W = 1;
42
43package Devel::PPPort;
44use vars '@ISA';
45require DynaLoader;
46@ISA = qw(DynaLoader);
47bootstrap Devel::PPPort;
48
49package main;
50
51my $uni = &Devel::PPPort::pv_escape_can_unicode();
52
53# sanity check
54ok($uni ? $] >= 5.006 : $] < 5.008);
55
56my @r;
57
58@r = &Devel::PPPort::pv_pretty();
59ok($r[0], $r[1]);
60ok($r[0], "foobarbaz");
61ok($r[2], $r[3]);
62ok($r[2], '<leftpv_p\retty\nright>');
63ok($r[4], $r[5]);
b7e2d8c7 64ok($r[4], $uni ? 'N\375 Batter\355' : 'N\303\275 Batter\303');
db42c902 65ok($r[6], $r[7]);
b7e2d8c7 66ok($r[6], $uni ? '\301g\346tis Byrju...' : '\303\201g\303\246t...');
db42c902
MHM
67
68@r = &Devel::PPPort::pv_display();
69ok($r[0], $r[1]);
70ok($r[0], '"foob\0rbaz"\0');
71ok($r[2], $r[3]);
72ok($r[2] eq '"pv_di"...\0' ||
73 $r[2] eq '"pv_d"...\0'); # some perl implementations are broken... :(
74