[svn:parrot] r49099 - in branches/gc_massacre: . examples/io examples/json t/op t/pmc t/steps/inter
bacek at svn.parrot.org
bacek at svn.parrot.org
Fri Sep 17 23:45:33 UTC 2010
Author: bacek
Date: Fri Sep 17 23:45:32 2010
New Revision: 49099
URL: https://trac.parrot.org/parrot/changeset/49099
Log:
Switch from charset to encoding opcodes in tests and examples
Deleted:
branches/gc_massacre/t/steps/inter/charset-01.t
branches/gc_massacre/t/steps/inter/encoding-01.t
Modified:
branches/gc_massacre/MANIFEST
branches/gc_massacre/examples/io/httpd.pir
branches/gc_massacre/examples/json/postalcodes.pir
branches/gc_massacre/t/op/string_cs.t
branches/gc_massacre/t/op/stringu.t
branches/gc_massacre/t/pmc/bytebuffer.t
branches/gc_massacre/t/pmc/filehandle.t
branches/gc_massacre/t/pmc/io.t
Modified: branches/gc_massacre/MANIFEST
==============================================================================
--- branches/gc_massacre/MANIFEST Fri Sep 17 23:45:05 2010 (r49098)
+++ branches/gc_massacre/MANIFEST Fri Sep 17 23:45:32 2010 (r49099)
@@ -2029,8 +2029,6 @@
t/steps/init/install-01.t [test]
t/steps/init/manifest-01.t [test]
t/steps/init/optimize-01.t [test]
-t/steps/inter/charset-01.t [test]
-t/steps/inter/encoding-01.t [test]
t/steps/inter/lex-01.t [test]
t/steps/inter/lex-02.t [test]
t/steps/inter/lex-03.t [test]
Modified: branches/gc_massacre/examples/io/httpd.pir
==============================================================================
--- branches/gc_massacre/examples/io/httpd.pir Fri Sep 17 23:45:05 2010 (r49098)
+++ branches/gc_massacre/examples/io/httpd.pir Fri Sep 17 23:45:32 2010 (r49099)
@@ -142,11 +142,11 @@
req = ""
MORE:
buf = work.'recv'()
- # charset I0, buf
- # charsetname S1, I0
+ # encoding I0, buf
+ # encodingname S1, I0
# print "\nret: "
# print ret
- # print "\ncharset of buf: "
+ # print "\nencoding of buf: "
# print S1
# print "\nbuf:"
# print buf
Modified: branches/gc_massacre/examples/json/postalcodes.pir
==============================================================================
--- branches/gc_massacre/examples/json/postalcodes.pir Fri Sep 17 23:45:05 2010 (r49098)
+++ branches/gc_massacre/examples/json/postalcodes.pir Fri Sep 17 23:45:32 2010 (r49099)
@@ -64,8 +64,8 @@
END:
close sock
- $I1 = find_charset 'unicode'
- json_result = trans_charset json_result, $I1
+ $I1 = find_encoding 'utf8'
+ json_result = trans_encoding json_result, $I1
# Strip off http headers.
$I0 = index json_result, "\r\n\r\n"
Modified: branches/gc_massacre/t/op/string_cs.t
==============================================================================
--- branches/gc_massacre/t/op/string_cs.t Fri Sep 17 23:45:05 2010 (r49098)
+++ branches/gc_massacre/t/op/string_cs.t Fri Sep 17 23:45:32 2010 (r49099)
@@ -19,7 +19,7 @@
=head1 DESCRIPTION
-Tests charset support.
+Tests encoding support.
=cut
@@ -37,10 +37,10 @@
ok 3
OUTPUT
-pasm_output_is( <<'CODE', <<OUTPUT, "charset name" );
+pasm_output_is( <<'CODE', <<OUTPUT, "encoding name" );
set S0, "ok 1\n"
- charset I0, S0
- charsetname S1, I0
+ encoding I0, S0
+ encodingname S1, I0
print S1
print "\n"
end
@@ -48,12 +48,12 @@
ascii
OUTPUT
-pasm_output_is( <<'CODE', <<OUTPUT, "find_charset" );
- find_charset I0, "iso-8859-1"
+pasm_output_is( <<'CODE', <<OUTPUT, "find_encoding" );
+ find_encoding I0, "iso-8859-1"
print "ok 1\n"
- find_charset I0, "ascii"
+ find_encoding I0, "ascii"
print "ok 2\n"
- find_charset I0, "binary"
+ find_encoding I0, "binary"
print "ok 3\n"
end
CODE
@@ -62,11 +62,11 @@
ok 3
OUTPUT
-pasm_error_output_like( <<'CODE', <<OUTPUT, "find_charset - not existing" );
- find_charset I0, "no_such"
+pasm_error_output_like( <<'CODE', <<OUTPUT, "find_encoding - not existing" );
+ find_encoding I0, "no_such"
end
CODE
-/charset 'no_such' not found/
+/encoding 'no_such' not found/
OUTPUT
pasm_output_is( <<'CODE', <<OUTPUT, "downcase" );
@@ -247,14 +247,14 @@
0 2 5 7 ok
OUTPUT
-pasm_output_is( <<'CODE', <<OUTPUT, "trans_charset_s_s_i" );
+pasm_output_is( <<'CODE', <<OUTPUT, "trans_encoding_s_s_i" );
set S0, "abc"
- find_charset I0, "iso-8859-1"
- trans_charset S1, S0, I0
+ find_encoding I0, "iso-8859-1"
+ trans_encoding S1, S0, I0
print S1
print "\n"
- charset I0, S1
- charsetname S2, I0
+ encoding I0, S1
+ encodingname S2, I0
print S2
print "\n"
end
@@ -263,24 +263,24 @@
iso-8859-1
OUTPUT
-pasm_error_output_like( <<'CODE', <<OUTPUT, "trans_charset_s_s_i - lossy" );
+pasm_error_output_like( <<'CODE', <<OUTPUT, "trans_encoding_s_s_i - lossy" );
set S1, iso-8859-1:"abcä"
- find_charset I0, "ascii"
- trans_charset S2, S1, I0
+ find_encoding I0, "ascii"
+ trans_encoding S2, S1, I0
print "never\n"
end
CODE
/lossy conversion to ascii/
OUTPUT
-pasm_output_is( <<'CODE', <<OUTPUT, "trans_charset_s_s_i iso-8859-1 to binary" );
+pasm_output_is( <<'CODE', <<OUTPUT, "trans_encoding_s_s_i iso-8859-1 to binary" );
set S0, iso-8859-1:"abc"
- find_charset I0, "binary"
- trans_charset S1, S0, I0
+ find_encoding I0, "binary"
+ trans_encoding S1, S0, I0
print S1
print "\n"
- charset I0, S1
- charsetname S2, I0
+ encoding I0, S1
+ encodingname S2, I0
print S2
print "\n"
end
@@ -289,14 +289,14 @@
binary
OUTPUT
-pasm_output_is( <<'CODE', <<OUTPUT, "trans_charset_s_s_i ascii to binary" );
+pasm_output_is( <<'CODE', <<OUTPUT, "trans_encoding_s_s_i ascii to binary" );
set S0, ascii:"abc"
- find_charset I0, "binary"
- trans_charset S1, S0, I0
+ find_encoding I0, "binary"
+ trans_encoding S1, S0, I0
print S1
print "\n"
- charset I0, S1
- charsetname S2, I0
+ encoding I0, S1
+ encodingname S2, I0
print S2
print "\n"
end
@@ -305,14 +305,14 @@
binary
OUTPUT
-pasm_output_is( <<'CODE', <<OUTPUT, "trans_charset_s_s_i ascii to iso-8859-1" );
+pasm_output_is( <<'CODE', <<OUTPUT, "trans_encoding_s_s_i ascii to iso-8859-1" );
set S0, ascii:"abc"
- find_charset I0, "iso-8859-1"
- trans_charset S1, S0, I0
+ find_encoding I0, "iso-8859-1"
+ trans_encoding S1, S0, I0
print S1
print "\n"
- charset I0, S1
- charsetname S2, I0
+ encoding I0, S1
+ encodingname S2, I0
print S2
print "\n"
end
@@ -321,14 +321,14 @@
iso-8859-1
OUTPUT
-pasm_output_is( <<'CODE', <<OUTPUT, "trans_charset_s_s_i iso-8859-1 to unicode" );
+pasm_output_is( <<'CODE', <<OUTPUT, "trans_encoding_s_s_i iso-8859-1 to utf8" );
set S0, iso-8859-1:"abc_ä_"
- find_charset I0, "unicode"
- trans_charset S1, S0, I0
+ find_encoding I0, "utf8"
+ trans_encoding S1, S0, I0
print S1
print "\n"
- charset I0, S1
- charsetname S2, I0
+ encoding I0, S1
+ encodingname S2, I0
print S2
print "\n"
length I2, S1
@@ -341,17 +341,17 @@
6
OUTPUT
-pasm_output_is( <<'CODE', <<OUTPUT, "trans_charset_s_s_i unicode to iso-8859-1" );
- set S0, unicode:"abc_\xe4_"
+pasm_output_is( <<'CODE', <<OUTPUT, "trans_encoding_s_s_i utf8 to iso-8859-1" );
+ set S0, utf8:"abc_\xe4_"
bytelength I2, S0 # XXX its 7 for utf8 only
print I2
print "\n"
- find_charset I0, "iso-8859-1"
- trans_charset S1, S0, I0
+ find_encoding I0, "iso-8859-1"
+ trans_encoding S1, S0, I0
print S1
print "\n"
- charset I0, S1
- charsetname S2, I0
+ encoding I0, S1
+ encodingname S2, I0
print S2
print "\n"
length I2, S1
@@ -367,7 +367,7 @@
pir_output_is( <<'CODE', <<'OUTPUT', "bug #34661 literal" );
.sub main :main
- $S0 = unicode:"\"]\nif I3 == "
+ $S0 = utf8:"\"]\nif I3 == "
print "ok 1\n"
.end
CODE
@@ -378,7 +378,7 @@
.sub main :main
$P0 = new 'Integer'
$P0 = 42
- set_global ['Foo'], unicode:"Bar", $P0
+ set_global ['Foo'], utf8:"Bar", $P0
print "ok 1\n"
$P1 = get_global ['Foo'], "Bar"
print "ok 2\n"
@@ -395,10 +395,10 @@
.sub main
.local string s, t, u
s = "abcd"
- t = unicode:"efg\n"
+ t = utf8:"efg\n"
u = s . t
print u
- s = unicode:"abcd"
+ s = utf8:"abcd"
t = "efg\n"
u = s . t
print u
@@ -413,8 +413,8 @@
pir_output_is( <<'CODE', <<"OUTPUT", "unicode downcase" );
.sub main :main
set $S0, iso-8859-1:"TÖTSCH"
- find_charset $I0, "unicode"
- trans_charset $S1, $S0, $I0
+ find_encoding $I0, "utf8"
+ trans_encoding $S1, $S0, $I0
$S1 = downcase $S1
getstdout $P0 # need to convert back to utf8
$P0.'encoding'("utf8") # set utf8 output
@@ -426,13 +426,13 @@
t\xc3\xb6tsch
OUTPUT
- pasm_output_is( <<'CODE', <<"OUTPUT", "unicode downcase, trans_charset_s_s_i" );
+ pasm_output_is( <<'CODE', <<"OUTPUT", "unicode downcase, trans_encoding_s_s_i" );
set S0, iso-8859-1:"TÖTSCH"
- find_charset I0, "unicode"
- trans_charset S1, S0, I0
+ find_encoding I0, "utf8"
+ trans_encoding S1, S0, I0
downcase S1, S1
- find_charset I0, "iso-8859-1"
- trans_charset S1, S1, I0
+ find_encoding I0, "iso-8859-1"
+ trans_encoding S1, S1, I0
print S1
print "\n"
end
@@ -447,10 +447,10 @@
/encoding #-1 not found/
OUTPUT
- pasm_output_is( <<'CODE', <<"OUTPUT", "unicode downcase - transcharset" );
+ pasm_output_is( <<'CODE', <<"OUTPUT", "unicode downcase - transencoding" );
set S0, iso-8859-1:"TÖTSCH"
- find_charset I0, "unicode"
- trans_charset S1, S0, I0
+ find_encoding I0, "utf8"
+ trans_encoding S1, S0, I0
downcase S1, S1
find_encoding I0, "utf8"
trans_encoding S2, S1, I0
@@ -462,9 +462,7 @@
OUTPUT
pasm_output_is( <<'CODE', <<"OUTPUT", "utf16 ord, length" );
- set S0, iso-8859-1:"TÖTSCH"
- find_charset I0, "unicode"
- trans_charset S1, S0, I0
+ set S1, iso-8859-1:"TÖTSCH"
find_encoding I0, "utf16"
trans_encoding S1, S1, I0
length I1, S1
@@ -486,8 +484,8 @@
pasm_output_is( <<'CODE', <<"OUTPUT", "chopn utf8" );
set S0, iso-8859-1:"TTÖÖ"
- find_charset I0, "unicode"
- trans_charset S1, S0, I0
+ find_encoding I0, "utf8"
+ trans_encoding S1, S0, I0
chopn S1, S1, 2
print S1
print ' '
@@ -504,9 +502,7 @@
OUTPUT
pasm_output_is( <<'CODE', <<"OUTPUT", "utf16 append" );
- set S0, iso-8859-1:"Tötsch"
- find_charset I0, "unicode"
- trans_charset S1, S0, I0
+ set S1, iso-8859-1:"Tötsch"
find_encoding I0, "utf16"
trans_encoding S1, S1, I0
concat S1, " Leo"
@@ -528,9 +524,7 @@
OUTPUT
pasm_output_is( <<'CODE', <<"OUTPUT", "utf16 concat" );
- set S0, iso-8859-1:"Tötsch"
- find_charset I0, "unicode"
- trans_charset S1, S0, I0
+ set S1, iso-8859-1:"Tötsch"
find_encoding I0, "utf16"
trans_encoding S1, S1, I0
concat S2, S1, " Leo"
@@ -552,9 +546,7 @@
OUTPUT
pasm_output_is( <<'CODE', <<"OUTPUT", "utf16 substr" );
- set S0, iso-8859-1:"Tötsch"
- find_charset I0, "unicode"
- trans_charset S1, S0, I0
+ set S1, iso-8859-1:"Tötsch"
find_encoding I0, "utf16"
trans_encoding S1, S1, I0
substr S2, S1, 1, 2
@@ -568,9 +560,7 @@
OUTPUT
pasm_output_is( <<'CODE', <<"OUTPUT", "utf16 replace" );
- set S0, iso-8859-1:"Tötsch"
- find_charset I0, "unicode"
- trans_charset S1, S0, I0
+ set S1, iso-8859-1:"Tötsch"
find_encoding I0, "utf16"
trans_encoding S1, S1, I0
substr S2, S1, 1, 1
@@ -590,8 +580,8 @@
pasm_output_is( <<'CODE', <<"OUTPUT", "utf16 index, latin1 search" );
set S0, iso-8859-1:"TÖTSCH"
- find_charset I0, "unicode"
- trans_charset S1, S0, I0
+ find_encoding I0, "utf8"
+ trans_encoding S1, S0, I0
downcase S1, S1
set S2, iso-8859-1:"öt"
index I0, S1, S2
@@ -604,8 +594,8 @@
pasm_output_is( <<'CODE', <<"OUTPUT", "utf16 index, latin1 search" );
set S0, iso-8859-1:"TÖTSCH"
- find_charset I0, "unicode"
- trans_charset S1, S0, I0
+ find_encoding I0, "utf8"
+ trans_encoding S1, S0, I0
downcase S1, S1
set S2, iso-8859-1:"öt"
index I0, S1, S2
@@ -624,8 +614,8 @@
pir_output_is( <<'CODE', <<"OUTPUT", "unicode upcase" );
.sub main :main
set $S0, iso-8859-1:"tötsch"
- find_charset $I0, "unicode"
- trans_charset $S1, $S0, $I0
+ find_encoding $I0, "utf8"
+ trans_encoding $S1, $S0, $I0
upcase $S1, $S1
getstdout $P0 # need to convert back to utf8
$P0.'encoding'("utf8") # set utf8 output
@@ -639,7 +629,7 @@
pir_output_is( <<'CODE', <<"OUTPUT", "unicode upcase to combined char" );
.sub main :main
- set $S1, unicode:"hacek j \u01f0"
+ set $S1, utf8:"hacek j \u01f0"
upcase $S1, $S1
getstdout $P0 # need to convert back to utf8
$P0.'encoding'("utf8") # set utf8 output
@@ -669,7 +659,7 @@
pir_output_is( <<'CODE', <<"OUTPUT", "unicode upcase to combined char 3.2 bug?" );
.sub main :main
- set $S1, unicode:"___\u01f0123"
+ set $S1, utf8:"___\u01f0123"
upcase $S1, $S1
getstdout $P0 # need to convert back to utf8
$P0.'encoding'("utf8") # set utf8 output
@@ -684,8 +674,8 @@
pir_output_is( <<'CODE', <<"OUTPUT", "unicode titlecase" );
.sub main :main
set $S0, iso-8859-1:"tötsch leo"
- find_charset $I0, "unicode"
- trans_charset $S1, $S0, $I0
+ find_encoding $I0, "utf8"
+ trans_encoding $S1, $S0, $I0
titlecase $S1, $S1
getstdout $P0 # need to convert back to utf8
$P0.'encoding'("utf8") # set utf8 output
@@ -699,7 +689,7 @@
pir_output_is( <<'CODE', <<OUTPUT, "combose combined char" );
.sub main :main
- set $S1, unicode:"___\u01f0___"
+ set $S1, utf8:"___\u01f0___"
length $I0, $S1
upcase $S1, $S1 # decompose J+hacek
length $I1, $S1 # 1 longer
@@ -759,7 +749,7 @@
OUTPUT
pasm_output_is( <<'CODE', <<'OUTPUT', "escape unicode" );
- set S0, unicode:"\u2001\u2002\u2003\u2004\x{e01ef}\u0114"
+ set S0, utf8:"\u2001\u2002\u2003\u2004\x{e01ef}\u0114"
escape S1, S0
print S1
print "\n"
@@ -770,7 +760,7 @@
pir_output_is(<<'CODE', <<'OUTPUT', 'escape unicode w/ literal 0' );
.sub 'main'
- $S0 = unicode:"x/\u0445\u0440\u0435\u043d\u044c_09-10.txt"
+ $S0 = utf8:"x/\u0445\u0440\u0435\u043d\u044c_09-10.txt"
$S1 = escape $S0
say $S1
.end
Modified: branches/gc_massacre/t/op/stringu.t
==============================================================================
--- branches/gc_massacre/t/op/stringu.t Fri Sep 17 23:45:05 2010 (r49098)
+++ branches/gc_massacre/t/op/stringu.t Fri Sep 17 23:45:32 2010 (r49099)
@@ -327,8 +327,8 @@
.local string s, t
.local int i
s = iso-8859-1:"T\xf6tsch"
- i = find_charset "unicode"
- s = trans_charset s, i
+ i = find_encoding "utf8"
+ s = trans_encoding s, i
t = upcase s
escape t, t
print t
Modified: branches/gc_massacre/t/pmc/bytebuffer.t
==============================================================================
--- branches/gc_massacre/t/pmc/bytebuffer.t Fri Sep 17 23:45:05 2010 (r49098)
+++ branches/gc_massacre/t/pmc/bytebuffer.t Fri Sep 17 23:45:32 2010 (r49099)
@@ -22,7 +22,7 @@
.sub 'main' :main
.include 'test_more.pir'
- plan(38)
+ plan(37)
test_init()
test_set_string()
@@ -353,17 +353,6 @@
.local string s
bb = new ['ByteBuffer']
bb = 'something'
- push_eh catch_charset
- s = bb.'get_string'('***INVALID cHARsET%%%%')
- pop_eh
- ok(0, "get_string with invalid charset should throw")
- goto check_encoding
-catch_charset:
- .get_results(ex)
- finalize ex
- pop_eh
- ok(1, "get_string with invalid charset throws")
-check_encoding:
push_eh catch_encoding
s = bb.'get_string'('ascii', '???INVALID eNCODING===')
pop_eh
Modified: branches/gc_massacre/t/pmc/filehandle.t
==============================================================================
--- branches/gc_massacre/t/pmc/filehandle.t Fri Sep 17 23:45:05 2010 (r49098)
+++ branches/gc_massacre/t/pmc/filehandle.t Fri Sep 17 23:45:32 2010 (r49099)
@@ -539,29 +539,19 @@
\$P1.'close'()
- \$I1 = charset line
- \$S2 = charsetname \$I1
- if \$S2 == 'utf8' goto ok_3
- print \$S2
- print 'not '
- ok_3:
- say 'ok 3 # unicode charset'
-
-
\$I1 = encoding line
\$S2 = encodingname \$I1
- if \$S2 == 'utf8' goto ok_4
+ if \$S2 == 'utf8' goto ok_3
print \$S2
print 'not '
- ok_4:
- say 'ok 4 # utf8 encoding'
+ ok_3:
+ say 'ok 3 # utf8 encoding'
.end
CODE
ok 1 - $S1 = $P1.readline() # read with utf8 encoding on
ok 2 - $S2 = $P1.readline() # read iso-8859-1 string
-ok 3 # unicode charset
-ok 4 # utf8 encoding
+ok 3 # utf8 encoding
OUT
Modified: branches/gc_massacre/t/pmc/io.t
==============================================================================
--- branches/gc_massacre/t/pmc/io.t Fri Sep 17 23:45:05 2010 (r49098)
+++ branches/gc_massacre/t/pmc/io.t Fri Sep 17 23:45:32 2010 (r49099)
@@ -626,21 +626,17 @@
$S1 = pio.'read'(1024) # read the rest of the file (much shorter than 1K)
$S0 .= $S1
pio.'close'()
- $I1 = charset $S0
- $S2 = charsetname $I1
- say $S2
$I1 = encoding $S0
$S2 = encodingname $I1
say $S2
- $I1 = find_charset 'iso-8859-1'
- trans_charset $S1, $S0, $I1
+ $I1 = find_encoding 'iso-8859-1'
+ trans_encoding $S1, $S0, $I1
print $S1
.end
CODE
utf8
-utf8
T\xf6tsch
OUTPUT
Deleted: branches/gc_massacre/t/steps/inter/charset-01.t
==============================================================================
--- branches/gc_massacre/t/steps/inter/charset-01.t Fri Sep 17 23:45:32 2010 (r49098)
+++ /dev/null 00:00:00 1970 (deleted)
@@ -1,114 +0,0 @@
-#! perl
-# Copyright (C) 2007, Parrot Foundation.
-# $Id$
-# inter/charset-01.t
-
-use strict;
-use warnings;
-use Test::More tests => 12;
-use Carp;
-use lib qw( lib t/configure/testlib );
-use_ok('config::inter::charset');
-use Parrot::Configure::Options qw( process_options );
-use Parrot::Configure::Step::Test;
-use Parrot::Configure::Test qw(
- test_step_constructor_and_description
-);
-use Tie::Filehandle::Preempt::Stdin;
-
-########## ask ##########
-
-my ($args, $step_list_ref) = process_options(
- {
- argv => [],
- mode => q{configure},
- }
-);
-
-my $conf = Parrot::Configure::Step::Test->new;
-$conf->include_config_results( $args );
-
-my $pkg = q{inter::charset};
-
-$conf->add_steps($pkg);
-
-my $serialized = $conf->pcfreeze();
-
-$conf->options->set( %{$args} );
-my $step = test_step_constructor_and_description($conf);
-{
- open STDOUT, '>', "/dev/null" or croak "Unable to open to myout";
- my $ret = $step->runstep($conf);
- close STDOUT or croak "Unable to close after myout";
- ok( $ret, "runstep() returned true value" );
-}
-
-$conf->replenish($serialized);
-
-########## ask ##########
-
-($args, $step_list_ref) = process_options(
- {
- argv => [ q{--ask} ],
- mode => q{configure},
- }
-);
-$conf->options->set( %{$args} );
-$step = test_step_constructor_and_description($conf);
-
-my ( @prompts, $object );
-
-$conf->options->set('intval' => 'alpha');
-$conf->options->set('floatval' => 'beta');
-$conf->options->set('opcode' => 'gamma');
- at prompts = qw( delta epsilon zeta );
-
-$object = tie *STDIN, 'Tie::Filehandle::Preempt::Stdin', @prompts;
-can_ok( 'Tie::Filehandle::Preempt::Stdin', ('READLINE') );
-isa_ok( $object, 'Tie::Filehandle::Preempt::Stdin' );
-
-{
- open STDOUT, '>', "/dev/null" or croak "Unable to open to myout";
- my $ret = $step->runstep($conf);
- close STDOUT or croak "Unable to close after myout";
- ok( $ret, "runstep() returned true value" );
-}
-
-undef $object;
-untie *STDIN;
- at prompts = ();
-
-pass("Completed all tests in $0");
-
-################### DOCUMENTATION ###################
-
-=head1 NAME
-
-inter/charset-01.t - test inter::charset
-
-=head1 SYNOPSIS
-
- % prove t/steps/inter/charset-01.t
-
-=head1 DESCRIPTION
-
-The files in this directory test functionality used by F<Configure.pl>.
-
-The tests in this file test inter::charset.
-
-=head1 AUTHOR
-
-James E Keenan
-
-=head1 SEE ALSO
-
-config::inter::charset, F<Configure.pl>.
-
-=cut
-
-# Local Variables:
-# mode: cperl
-# cperl-indent-level: 4
-# fill-column: 100
-# End:
-# vim: expandtab shiftwidth=4:
Deleted: branches/gc_massacre/t/steps/inter/encoding-01.t
==============================================================================
--- branches/gc_massacre/t/steps/inter/encoding-01.t Fri Sep 17 23:45:32 2010 (r49098)
+++ /dev/null 00:00:00 1970 (deleted)
@@ -1,110 +0,0 @@
-#! perl
-# Copyright (C) 2007, Parrot Foundation.
-# $Id$
-# inter/encoding-01.t
-
-use strict;
-use warnings;
-use Test::More tests => 12;
-use Carp;
-use lib qw( lib t/configure/testlib );
-use_ok('config::inter::encoding');
-use Parrot::Configure::Options qw( process_options );
-use Parrot::Configure::Step::Test;
-use Parrot::Configure::Test qw(
- test_step_constructor_and_description
-);
-use Tie::Filehandle::Preempt::Stdin;
-
-########## no ask ##########
-
-my ($args, $step_list_ref) = process_options(
- {
- argv => [],
- mode => q{configure},
- }
-);
-
-my $conf = Parrot::Configure::Step::Test->new;
-$conf->include_config_results( $args );
-
-my $pkg = q{inter::encoding};
-
-$conf->add_steps($pkg);
-
-my $serialized = $conf->pcfreeze();
-
-$conf->options->set( %{$args} );
-my $step = test_step_constructor_and_description($conf);
-{
- open STDOUT, '>', "/dev/null" or croak "Unable to open to myout";
- my $ret = $step->runstep($conf);
- close STDOUT or croak "Unable to close after myout";
- ok( $ret, "runstep() returned true value" );
-}
-
-$conf->replenish($serialized);
-
-########## ask; $ENV{TEST_ENCODING} ##########
-
-$ENV{TEST_ENCODING} = 'fixed_8.c';
-do config::inter::encoding;
-($args, $step_list_ref) = process_options(
- {
- argv => [q{--ask}],
- mode => q{configure},
- }
-);
-$conf->options->set( %{$args} );
-$step = test_step_constructor_and_description($conf);
-my ( @prompts, $prompt, $object );
-$prompt = $ENV{TEST_ENCODING};
-push @prompts, $prompt;
-$object = tie *STDIN, 'Tie::Filehandle::Preempt::Stdin', @prompts;
-can_ok( 'Tie::Filehandle::Preempt::Stdin', ('READLINE') );
-isa_ok( $object, 'Tie::Filehandle::Preempt::Stdin' );
-{
- open STDOUT, '>', "/dev/null" or croak "Unable to open to myout";
- my $ret = $step->runstep($conf);
- close STDOUT or croak "Unable to close after myout";
- ok( $ret, "runstep() returned true value" );
-}
-
-undef $object;
-untie *STDIN;
- at prompts = ();
-
-pass("Completed all tests in $0");
-
-################### DOCUMENTATION ###################
-
-=head1 NAME
-
-inter/encoding-01.t - test inter::encoding
-
-=head1 SYNOPSIS
-
- % prove t/steps/inter/encoding-01.t
-
-=head1 DESCRIPTION
-
-The files in this directory test functionality used by F<Configure.pl>.
-
-The tests in this file test inter::encoding.
-
-=head1 AUTHOR
-
-James E Keenan
-
-=head1 SEE ALSO
-
-config::inter::encoding, F<Configure.pl>.
-
-=cut
-
-# Local Variables:
-# mode: cperl
-# cperl-indent-level: 4
-# fill-column: 100
-# End:
-# vim: expandtab shiftwidth=4:
More information about the parrot-commits
mailing list