summaryrefslogtreecommitdiff
path: root/t/uni
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2009-10-06 14:05:20 +0200
committerNicholas Clark <nick@ccl4.org>2009-10-06 14:05:20 +0200
commite4206093c9a6ef09175024ffdd3930ca2c116c26 (patch)
treef217217473a05c562d2c9ada3d51464719666b3c /t/uni
parentab8be49d36ac8fa0d20103344a61b3e7233fcba4 (diff)
downloadperl-e4206093c9a6ef09175024ffdd3930ca2c116c26.tar.gz
Standardise t/uni/*.t on ./test.pl, and remove PERL_CORE boilerplate.
TestInit sets up the directory for us. Also remove unncessary C<use Encode>s.
Diffstat (limited to 't/uni')
-rw-r--r--t/uni/chomp.t9
-rw-r--r--t/uni/chr.t11
-rw-r--r--t/uni/lex_utf8.t5
-rw-r--r--t/uni/overload.t9
-rw-r--r--t/uni/tie.t9
-rw-r--r--t/uni/tr_7jis.t9
-rw-r--r--t/uni/tr_eucjp.t9
-rw-r--r--t/uni/tr_sjis.t9
-rw-r--r--t/uni/tr_utf8.t5
9 files changed, 30 insertions, 45 deletions
diff --git a/t/uni/chomp.t b/t/uni/chomp.t
index 5f52558ab6..6aef50c17c 100644
--- a/t/uni/chomp.t
+++ b/t/uni/chomp.t
@@ -1,10 +1,6 @@
#!./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";
@@ -22,11 +18,12 @@ BEGIN {
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.
diff --git a/t/uni/chr.t b/t/uni/chr.t
index ab710d9e35..8d7924f3da 100644
--- a/t/uni/chr.t
+++ b/t/uni/chr.t
@@ -1,9 +1,6 @@
+#!./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";
@@ -22,12 +19,12 @@ BEGIN {
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");
diff --git a/t/uni/lex_utf8.t b/t/uni/lex_utf8.t
index c7d1778bef..2aa9221a80 100644
--- a/t/uni/lex_utf8.t
+++ b/t/uni/lex_utf8.t
@@ -1,3 +1,4 @@
+#!./perl -w
#
# This script is written intentionally in UTF-8
@@ -7,11 +8,13 @@ BEGIN {
exit 0;
}
$| = 1;
+
+ require './test.pl';
}
use strict;
-use Test::More tests => 10;
+plan (tests => 10);
use charnames ':full';
use utf8;
diff --git a/t/uni/overload.t b/t/uni/overload.t
index d44d1711cf..d7c06f5201 100644
--- a/t/uni/overload.t
+++ b/t/uni/overload.t
@@ -1,13 +1,12 @@
#!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;
diff --git a/t/uni/tie.t b/t/uni/tie.t
index fa9f268bbf..28ea0dc7c4 100644
--- a/t/uni/tie.t
+++ b/t/uni/tie.t
@@ -1,13 +1,10 @@
#!perl -w
BEGIN {
- if ($ENV{'PERL_CORE'}){
- chdir 't';
- @INC = '../lib';
- }
+ require './test.pl';
}
-use Test::More tests => 9;
+plan (tests => 9);
use strict;
{
@@ -44,6 +41,6 @@ foreach my $t ("ASCII", "B\366se") {
}
{
- local $TODO = "Need more tests!";
+ local $::TODO = "Need more tests!";
fail();
}
diff --git a/t/uni/tr_7jis.t b/t/uni/tr_7jis.t
index 54df6a093a..214f456a64 100644
--- a/t/uni/tr_7jis.t
+++ b/t/uni/tr_7jis.t
@@ -1,3 +1,4 @@
+#! perl -w
#
# $Id$
#
@@ -6,10 +7,6 @@
# -- 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";
@@ -28,11 +25,11 @@ BEGIN {
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("$B$!(B")..ord("$B$s(B");
diff --git a/t/uni/tr_eucjp.t b/t/uni/tr_eucjp.t
index 03dec71357..98c684500d 100644
--- a/t/uni/tr_eucjp.t
+++ b/t/uni/tr_eucjp.t
@@ -1,3 +1,4 @@
+#! perl -w
#
# $Id$
#
@@ -5,10 +6,6 @@
# -- 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";
@@ -27,11 +24,11 @@ BEGIN {
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("");
diff --git a/t/uni/tr_sjis.t b/t/uni/tr_sjis.t
index 9e05167543..dd4fe0c5f0 100644
--- a/t/uni/tr_sjis.t
+++ b/t/uni/tr_sjis.t
@@ -1,3 +1,4 @@
+#!perl -w
#
# $Id$
#
@@ -5,10 +6,6 @@
# -- 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";
@@ -27,11 +24,11 @@ BEGIN {
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("");
diff --git a/t/uni/tr_utf8.t b/t/uni/tr_utf8.t
index 354156a641..12ed430b76 100644
--- a/t/uni/tr_utf8.t
+++ b/t/uni/tr_utf8.t
@@ -1,3 +1,4 @@
+#!perl -w
#
# $Id$
#
@@ -28,11 +29,11 @@ BEGIN {
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("ん");