TestInit sets up the directory for us.
Also remove unncessary C<use Encode>s.
#!./perl -w
BEGIN {
- if ($ENV{'PERL_CORE'}){
- chdir 't';
- @INC = '../lib';
- }
require Config; import Config;
if ($Config{'extensions'} !~ /\bEncode\b/) {
print "1..0 # Skip: Encode was not built\n";
print "1..0 # Skip: no dynamic loading on miniperl, no Encode\n";
exit 0;
}
+
+ require './test.pl';
}
-use Encode;
use strict;
-use Test::More;
+use Encode;
# %mbchars = (encoding => { bytes => utf8, ... }, ...);
# * pack('C*') is expected to return bytes even if ${^ENCODING} is true.
+#!./perl -w
BEGIN {
- if ($ENV{'PERL_CORE'}){
- chdir 't';
- @INC = '../lib';
- }
require Config; import Config;
if ($Config{'extensions'} !~ /\bEncode\b/) {
print "1..0 # Skip: Encode was not built\n";
exit 0;
}
$| = 1;
+
+ require './test.pl';
}
use strict;
-use Test::More tests => 6;
-use Encode;
-
+plan (tests => 6);
use encoding 'johab';
ok(chr(0x7f) eq "\x7f");
+#!./perl -w
#
# This script is written intentionally in UTF-8
exit 0;
}
$| = 1;
+
+ require './test.pl';
}
use strict;
-use Test::More tests => 10;
+plan (tests => 10);
use charnames ':full';
use utf8;
#!perl -w
BEGIN {
- if ($ENV{'PERL_CORE'}){
- chdir 't';
- @INC = '../lib';
- }
+ chdir 't';
+ @INC = '../lib';
+ require './test.pl';
}
-use Test::More tests => 215;
+plan(tests => 215);
package UTF8Toggle;
use strict;
#!perl -w
BEGIN {
- if ($ENV{'PERL_CORE'}){
- chdir 't';
- @INC = '../lib';
- }
+ require './test.pl';
}
-use Test::More tests => 9;
+plan (tests => 9);
use strict;
{
}
{
- local $TODO = "Need more tests!";
+ local $::TODO = "Need more tests!";
fail();
}
+#! perl -w
#
# $Id$
#
# -- dankogai
BEGIN {
- if ($ENV{'PERL_CORE'}){
- chdir 't';
- @INC = '../lib';
- }
require Config; import Config;
if ($Config{'extensions'} !~ /\bEncode\b/) {
print "1..0 # Skip: Encode was not built\n";
exit 0;
}
$| = 1;
+ require './test.pl';
}
use strict;
-use Test::More tests => 6;
-use Encode;
+plan(tests => 6);
use encoding 'iso-2022-jp';
my @hiragana = map {chr} ord("\e$B$!\e(B")..ord("\e$B$s\e(B");
+#! perl -w
#
# $Id$
#
# -- dankogai
BEGIN {
- if ($ENV{'PERL_CORE'}){
- chdir 't';
- @INC = '../lib';
- }
require Config; import Config;
if ($Config{'extensions'} !~ /\bEncode\b/) {
print "1..0 # Skip: Encode was not built\n";
exit 0;
}
$| = 1;
+ require './test.pl';
}
use strict;
-use Test::More tests => 6;
-use Encode;
+plan(tests => 6);
use encoding 'euc-jp';
my @hiragana = map {chr} ord("¤¡")..ord("¤ó");
+#!perl -w
#
# $Id$
#
# -- dankogai
BEGIN {
- if ($ENV{'PERL_CORE'}){
- chdir 't';
- @INC = '../lib';
- }
require Config; import Config;
if ($Config{'extensions'} !~ /\bEncode\b/) {
print "1..0 # Skip: Encode was not built\n";
exit 0;
}
$| = 1;
+ require './test.pl';
}
use strict;
-use Test::More tests => 6;
-use Encode;
+plan(tests => 6);
use encoding 'shiftjis';
my @hiragana = map {chr} ord("")..ord("ñ");
+#!perl -w
#
# $Id$
#
exit 0;
}
$| = 1;
+ require './test.pl';
}
use strict;
-use Test::More tests => 8;
-
+plan(tests => 8);
use encoding 'utf8';
my @hiragana = map {chr} ord("ぁ")..ord("ん");