summaryrefslogtreecommitdiffstats
path: root/test/ruby
diff options
context:
space:
mode:
authornahi <nahi@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-02-18 13:08:08 +0000
committernahi <nahi@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-02-18 13:08:08 +0000
commit6f65f52a94f6fa1ec995758e517e1ebf87f6ba97 (patch)
tree23838d872b2934afececd0def03b7e06d9db6cfe /test/ruby
parent66e294c29fc728b9c17107df2cbd0c4e0a4a5c77 (diff)
downloadruby-6f65f52a94f6fa1ec995758e517e1ebf87f6ba97.tar.gz
ruby-6f65f52a94f6fa1ec995758e517e1ebf87f6ba97.tar.xz
ruby-6f65f52a94f6fa1ec995758e517e1ebf87f6ba97.zip
* test/*: should not depend on $KCODE.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@5764 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby')
-rw-r--r--test/ruby/test_alias.rb2
-rw-r--r--test/ruby/test_array.rb2
-rw-r--r--test/ruby/test_assignment.rb2
-rw-r--r--test/ruby/test_bignum.rb2
-rw-r--r--test/ruby/test_call.rb2
-rw-r--r--test/ruby/test_case.rb2
-rw-r--r--test/ruby/test_clone.rb2
-rw-r--r--test/ruby/test_condition.rb2
-rw-r--r--test/ruby/test_const.rb2
-rw-r--r--test/ruby/test_defined.rb2
-rw-r--r--test/ruby/test_env.rb2
-rw-r--r--test/ruby/test_eval.rb2
-rw-r--r--test/ruby/test_exception.rb2
-rw-r--r--test/ruby/test_file.rb2
-rw-r--r--test/ruby/test_float.rb2
-rw-r--r--test/ruby/test_gc.rb2
-rw-r--r--test/ruby/test_hash.rb2
-rw-r--r--test/ruby/test_ifunless.rb2
-rw-r--r--test/ruby/test_iterator.rb2
-rw-r--r--test/ruby/test_marshal.rb2
-rw-r--r--test/ruby/test_math.rb2
-rw-r--r--test/ruby/test_pack.rb2
-rw-r--r--test/ruby/test_path.rb2
-rw-r--r--test/ruby/test_pipe.rb2
-rw-r--r--test/ruby/test_proc.rb2
-rw-r--r--test/ruby/test_range.rb2
-rw-r--r--test/ruby/test_signal.rb2
-rw-r--r--test/ruby/test_sprintf.rb2
-rw-r--r--test/ruby/test_stringchar.rb2
-rw-r--r--test/ruby/test_struct.rb2
-rw-r--r--test/ruby/test_system.rb2
-rw-r--r--test/ruby/test_trace.rb2
-rw-r--r--test/ruby/test_variable.rb2
-rw-r--r--test/ruby/test_whileuntil.rb2
34 files changed, 0 insertions, 68 deletions
diff --git a/test/ruby/test_alias.rb b/test/ruby/test_alias.rb
index 50fe45273..83f897fb0 100644
--- a/test/ruby/test_alias.rb
+++ b/test/ruby/test_alias.rb
@@ -1,7 +1,5 @@
require 'test/unit'
-$KCODE = 'none'
-
class TestAlias < Test::Unit::TestCase
class Alias0
def foo; "foo" end
diff --git a/test/ruby/test_array.rb b/test/ruby/test_array.rb
index ed2ee5961..62582864e 100644
--- a/test/ruby/test_array.rb
+++ b/test/ruby/test_array.rb
@@ -1,7 +1,5 @@
require 'test/unit'
-$KCODE = 'none'
-
class TestArray < Test::Unit::TestCase
def test_array
assert_equal([1, 2, 3, 4], [1, 2] + [3, 4])
diff --git a/test/ruby/test_assignment.rb b/test/ruby/test_assignment.rb
index 51d1c780f..63f37a9d7 100644
--- a/test/ruby/test_assignment.rb
+++ b/test/ruby/test_assignment.rb
@@ -1,7 +1,5 @@
require 'test/unit'
-$KCODE = 'none'
-
class TestAssignment < Test::Unit::TestCase
def test_assign
a=[]; a[0] ||= "bar";
diff --git a/test/ruby/test_bignum.rb b/test/ruby/test_bignum.rb
index d05bc5406..c238337db 100644
--- a/test/ruby/test_bignum.rb
+++ b/test/ruby/test_bignum.rb
@@ -1,7 +1,5 @@
require 'test/unit'
-$KCODE = 'none'
-
class TestBignum < Test::Unit::TestCase
def fact(n)
return 1 if n == 0
diff --git a/test/ruby/test_call.rb b/test/ruby/test_call.rb
index 7694d5196..da7ee93c7 100644
--- a/test/ruby/test_call.rb
+++ b/test/ruby/test_call.rb
@@ -1,7 +1,5 @@
require 'test/unit'
-$KCODE = 'none'
-
class TestCall < Test::Unit::TestCase
def aaa(a, b=100, *rest)
res = [a, b]
diff --git a/test/ruby/test_case.rb b/test/ruby/test_case.rb
index 240735696..41a22038a 100644
--- a/test/ruby/test_case.rb
+++ b/test/ruby/test_case.rb
@@ -1,7 +1,5 @@
require 'test/unit'
-$KCODE = 'none'
-
class TestCase < Test::Unit::TestCase
def test_case
case 5
diff --git a/test/ruby/test_clone.rb b/test/ruby/test_clone.rb
index 612636c04..43c0cffa1 100644
--- a/test/ruby/test_clone.rb
+++ b/test/ruby/test_clone.rb
@@ -1,7 +1,5 @@
require 'test/unit'
-$KCODE = 'none'
-
class TestClone < Test::Unit::TestCase
module M001; end
module M002; end
diff --git a/test/ruby/test_condition.rb b/test/ruby/test_condition.rb
index 2ef2e0db3..ba2e0688f 100644
--- a/test/ruby/test_condition.rb
+++ b/test/ruby/test_condition.rb
@@ -1,7 +1,5 @@
require 'test/unit'
-$KCODE = 'none'
-
class TestCondition < Test::Unit::TestCase
# [should] first test to see if we can run the tests.
diff --git a/test/ruby/test_const.rb b/test/ruby/test_const.rb
index dfacceb62..8d01379db 100644
--- a/test/ruby/test_const.rb
+++ b/test/ruby/test_const.rb
@@ -1,7 +1,5 @@
require 'test/unit'
-$KCODE = 'none'
-
class TestConst < Test::Unit::TestCase
TEST1 = 1
TEST2 = 2
diff --git a/test/ruby/test_defined.rb b/test/ruby/test_defined.rb
index d386b4bdd..8a7fcf45a 100644
--- a/test/ruby/test_defined.rb
+++ b/test/ruby/test_defined.rb
@@ -1,7 +1,5 @@
require 'test/unit'
-$KCODE = 'none'
-
class TestDefined < Test::Unit::TestCase
class Foo
def foo
diff --git a/test/ruby/test_env.rb b/test/ruby/test_env.rb
index 7d660f05a..edc7dcaf6 100644
--- a/test/ruby/test_env.rb
+++ b/test/ruby/test_env.rb
@@ -1,7 +1,5 @@
require 'test/unit'
-$KCODE = 'none'
-
class TestEnv < Test::Unit::TestCase
IGNORE_CASE = /djgpp|bccwin|mswin|mingw/ =~ RUBY_PLATFORM
diff --git a/test/ruby/test_eval.rb b/test/ruby/test_eval.rb
index c64741df3..28fd01c70 100644
--- a/test/ruby/test_eval.rb
+++ b/test/ruby/test_eval.rb
@@ -1,7 +1,5 @@
require 'test/unit'
-$KCODE = 'none'
-
class TestEval < Test::Unit::TestCase
# eval with binding
def test_ev
diff --git a/test/ruby/test_exception.rb b/test/ruby/test_exception.rb
index b6abf38c8..4c27c52f3 100644
--- a/test/ruby/test_exception.rb
+++ b/test/ruby/test_exception.rb
@@ -1,7 +1,5 @@
require 'test/unit'
-$KCODE = 'none'
-
class TestException < Test::Unit::TestCase
def test_exception
begin
diff --git a/test/ruby/test_file.rb b/test/ruby/test_file.rb
index 375ff6672..c4095428e 100644
--- a/test/ruby/test_file.rb
+++ b/test/ruby/test_file.rb
@@ -2,8 +2,6 @@ require 'test/unit'
require 'tempfile'
require 'ut_eof'
-$KCODE = 'none'
-
class TestFile < Test::Unit::TestCase
# I don't know Ruby's spec about "unlink-before-close" exactly.
diff --git a/test/ruby/test_float.rb b/test/ruby/test_float.rb
index efb69954a..c18700a57 100644
--- a/test/ruby/test_float.rb
+++ b/test/ruby/test_float.rb
@@ -1,7 +1,5 @@
require 'test/unit'
-$KCODE = 'none'
-
class TestFloat < Test::Unit::TestCase
def test_float
assert_equal(2, 2.6.floor)
diff --git a/test/ruby/test_gc.rb b/test/ruby/test_gc.rb
index 5b824309a..d0b4e3df7 100644
--- a/test/ruby/test_gc.rb
+++ b/test/ruby/test_gc.rb
@@ -1,7 +1,5 @@
require 'test/unit'
-$KCODE = 'none'
-
class TestGc < Test::Unit::TestCase
class S
def initialize(a)
diff --git a/test/ruby/test_hash.rb b/test/ruby/test_hash.rb
index c20f67f57..5bec012bf 100644
--- a/test/ruby/test_hash.rb
+++ b/test/ruby/test_hash.rb
@@ -1,7 +1,5 @@
require 'test/unit'
-$KCODE = 'none'
-
class TestHash < Test::Unit::TestCase
def test_hash
x = {1=>2, 2=>4, 3=>6}
diff --git a/test/ruby/test_ifunless.rb b/test/ruby/test_ifunless.rb
index 7910f81b5..bffc79451 100644
--- a/test/ruby/test_ifunless.rb
+++ b/test/ruby/test_ifunless.rb
@@ -1,7 +1,5 @@
require 'test/unit'
-$KCODE = 'none'
-
class TestIfunless < Test::Unit::TestCase
def test_if_unless
$x = 'test';
diff --git a/test/ruby/test_iterator.rb b/test/ruby/test_iterator.rb
index c8631653f..f3c2201e0 100644
--- a/test/ruby/test_iterator.rb
+++ b/test/ruby/test_iterator.rb
@@ -1,7 +1,5 @@
require 'test/unit'
-$KCODE = 'none'
-
class Array
def iter_test1
collect{|e| [e, yield(e)]}.sort{|a,b|a[1]<=>b[1]}
diff --git a/test/ruby/test_marshal.rb b/test/ruby/test_marshal.rb
index 2008e3f36..9c9fd9470 100644
--- a/test/ruby/test_marshal.rb
+++ b/test/ruby/test_marshal.rb
@@ -8,8 +8,6 @@ ensure
$:.replace(orgpath)
end
-$KCODE = 'none'
-
class TestMarshal < Test::Unit::TestCase
include MarshalTestLib
diff --git a/test/ruby/test_math.rb b/test/ruby/test_math.rb
index c5ddbbdb0..e1e49dba0 100644
--- a/test/ruby/test_math.rb
+++ b/test/ruby/test_math.rb
@@ -1,7 +1,5 @@
require 'test/unit'
-$KCODE = 'none'
-
class TestMath < Test::Unit::TestCase
def test_math
assert_equal(2, Math.sqrt(4))
diff --git a/test/ruby/test_pack.rb b/test/ruby/test_pack.rb
index 9939f9f07..863dfbe82 100644
--- a/test/ruby/test_pack.rb
+++ b/test/ruby/test_pack.rb
@@ -1,7 +1,5 @@
require 'test/unit'
-$KCODE = 'none'
-
class TestPack < Test::Unit::TestCase
def test_pack
$format = "c2x5CCxsdils_l_a6";
diff --git a/test/ruby/test_path.rb b/test/ruby/test_path.rb
index 55452beb7..95a5d5b1d 100644
--- a/test/ruby/test_path.rb
+++ b/test/ruby/test_path.rb
@@ -1,7 +1,5 @@
require 'test/unit'
-$KCODE = 'none'
-
class TestPath < Test::Unit::TestCase
def test_path
assert_equal("a", File.basename("a"))
diff --git a/test/ruby/test_pipe.rb b/test/ruby/test_pipe.rb
index a6b7c14ed..c2f355185 100644
--- a/test/ruby/test_pipe.rb
+++ b/test/ruby/test_pipe.rb
@@ -2,8 +2,6 @@ require 'test/unit'
require 'ut_eof'
require 'envutil'
-$KCODE = 'none'
-
class TestPipe < Test::Unit::TestCase
include TestEOF
def open_file(content)
diff --git a/test/ruby/test_proc.rb b/test/ruby/test_proc.rb
index 23b84ed20..f0b78ffb2 100644
--- a/test/ruby/test_proc.rb
+++ b/test/ruby/test_proc.rb
@@ -1,7 +1,5 @@
require 'test/unit'
-$KCODE = 'none'
-
class TestProc < Test::Unit::TestCase
def test_proc
p1 = proc{|i| i}
diff --git a/test/ruby/test_range.rb b/test/ruby/test_range.rb
index 0b79f5f09..66ed55588 100644
--- a/test/ruby/test_range.rb
+++ b/test/ruby/test_range.rb
@@ -1,7 +1,5 @@
require 'test/unit'
-$KCODE = 'none'
-
class TestRange < Test::Unit::TestCase
def test_range_string
# XXX: Is this really the test of Range?
diff --git a/test/ruby/test_signal.rb b/test/ruby/test_signal.rb
index 77c97be98..d212f9fcc 100644
--- a/test/ruby/test_signal.rb
+++ b/test/ruby/test_signal.rb
@@ -1,7 +1,5 @@
require 'test/unit'
-$KCODE = 'none'
-
class TestSignal < Test::Unit::TestCase
def test_signal
defined?(Process.kill) or return
diff --git a/test/ruby/test_sprintf.rb b/test/ruby/test_sprintf.rb
index e6cfb5b01..8716e7021 100644
--- a/test/ruby/test_sprintf.rb
+++ b/test/ruby/test_sprintf.rb
@@ -1,7 +1,5 @@
require 'test/unit'
-$KCODE = 'none'
-
class TestSprintf < Test::Unit::TestCase
def test_binary
assert_equal("0", sprintf("%b", 0))
diff --git a/test/ruby/test_stringchar.rb b/test/ruby/test_stringchar.rb
index e9b643ad3..943b65651 100644
--- a/test/ruby/test_stringchar.rb
+++ b/test/ruby/test_stringchar.rb
@@ -1,7 +1,5 @@
require 'test/unit'
-$KCODE = 'none'
-
class TestStringchar < Test::Unit::TestCase
def test_string
assert_equal("abcd", "abcd")
diff --git a/test/ruby/test_struct.rb b/test/ruby/test_struct.rb
index 4a57537d3..fa1bb1549 100644
--- a/test/ruby/test_struct.rb
+++ b/test/ruby/test_struct.rb
@@ -1,7 +1,5 @@
require 'test/unit'
-$KCODE = 'none'
-
class TestStruct < Test::Unit::TestCase
def test_struct
struct_test = Struct.new("Test", :foo, :bar)
diff --git a/test/ruby/test_system.rb b/test/ruby/test_system.rb
index 322b0c9ce..410dd83e2 100644
--- a/test/ruby/test_system.rb
+++ b/test/ruby/test_system.rb
@@ -1,8 +1,6 @@
require 'test/unit'
require 'envutil'
-$KCODE = 'none'
-
class TestSystem < Test::Unit::TestCase
def valid_syntax?(code, fname)
eval("BEGIN {return true}\n#{code}", nil, fname, 0)
diff --git a/test/ruby/test_trace.rb b/test/ruby/test_trace.rb
index 69c0c24fe..6adfe0bf6 100644
--- a/test/ruby/test_trace.rb
+++ b/test/ruby/test_trace.rb
@@ -1,7 +1,5 @@
require 'test/unit'
-$KCODE = 'none'
-
class TestTrace < Test::Unit::TestCase
def test_trace
$x = 1234
diff --git a/test/ruby/test_variable.rb b/test/ruby/test_variable.rb
index ab0e40511..872616082 100644
--- a/test/ruby/test_variable.rb
+++ b/test/ruby/test_variable.rb
@@ -1,7 +1,5 @@
require 'test/unit'
-$KCODE = 'none'
-
class TestVariable < Test::Unit::TestCase
class Gods
@@rule = "Uranus"
diff --git a/test/ruby/test_whileuntil.rb b/test/ruby/test_whileuntil.rb
index 841a15135..6faed3116 100644
--- a/test/ruby/test_whileuntil.rb
+++ b/test/ruby/test_whileuntil.rb
@@ -1,7 +1,5 @@
require 'test/unit'
-$KCODE = 'none'
-
class TestWhileuntil < Test::Unit::TestCase
def test_while
tmp = open("while_tmp", "w")