summaryrefslogtreecommitdiff
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
commit994dfc0ae6a3c42bb9311f736ca30275779e348a (patch)
tree23838d872b2934afececd0def03b7e06d9db6cfe /test/ruby
parent44284f71c91b309d46b35fc683504235de6f8e50 (diff)
* test/*: should not depend on $KCODE.
git-svn-id: svn+ssh://ci.ruby-lang.org/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 50fe452734..83f897fb00 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 ed2ee5961c..62582864e3 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 51d1c780f8..63f37a9d73 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 d05bc5406b..c238337db5 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 7694d5196c..da7ee93c73 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 2407356965..41a22038a0 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 612636c046..43c0cffa1d 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 2ef2e0db30..ba2e0688f3 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 dfacceb629..8d01379dbd 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 d386b4bddc..8a7fcf45a9 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 7d660f05a5..edc7dcaf61 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 c64741df33..28fd01c70c 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 b6abf38c89..4c27c52f3c 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 375ff66721..c4095428e1 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 efb69954a1..c18700a575 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 5b824309ac..d0b4e3df77 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 c20f67f573..5bec012bf8 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 7910f81b52..bffc794512 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 c8631653f3..f3c2201e0a 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 2008e3f36a..9c9fd9470b 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 c5ddbbdb05..e1e49dba01 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 9939f9f07b..863dfbe82f 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 55452beb70..95a5d5b1d1 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 a6b7c14edd..c2f355185b 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 23b84ed20f..f0b78ffb23 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 0b79f5f098..66ed555887 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 77c97be98c..d212f9fcc3 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 e6cfb5b016..8716e7021d 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 e9b643ad3f..943b656510 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 4a57537d37..fa1bb1549a 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 322b0c9ceb..410dd83e2a 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 69c0c24fe7..6adfe0bf64 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 ab0e405115..8726160826 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 841a15135d..6faed31160 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")