From 973e630f0319470eed8909d7a8aa7a1c89c62cea Mon Sep 17 00:00:00 2001 From: nobu Date: Sat, 22 Oct 2005 04:30:03 +0000 Subject: [PATCH] commit miss. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9441 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test_symbol.rb | 50 -------------------------------------------------- 1 file changed, 50 deletions(-) delete mode 100644 test_symbol.rb diff --git a/test_symbol.rb b/test_symbol.rb deleted file mode 100644 index b6dd203596..0000000000 --- a/test_symbol.rb +++ /dev/null @@ -1,50 +0,0 @@ -require 'test/unit' - -class TestSymbol < Test::Unit::TestCase - # [ruby-core:3573] - - def assert_eval_inspected(sym) - n = sym.inspect - assert_nothing_raised(SyntaxError) {assert_equal(sym, eval(n))} - end - - def test_inspect_invalid - # 2) Symbol#inspect sometimes returns invalid symbol representations: - assert_eval_inspected(:"!") - assert_eval_inspected(:"=") - assert_eval_inspected(:"0") - assert_eval_inspected(:"$1") - assert_eval_inspected(:"@1") - assert_eval_inspected(:"@@1") - assert_eval_inspected(:"@") - assert_eval_inspected(:"@@") - end - - def assert_inspect_evaled(n) - assert_nothing_raised(SyntaxError) {assert_equal(n, eval(n).inspect)} - end - - def test_inspect_suboptimal - # 3) Symbol#inspect sometimes returns suboptimal symbol representations: - assert_inspect_evaled(':foo') - assert_inspect_evaled(':foo!') - assert_inspect_evaled(':bar?') - end - - def test_inspect_dollar - # 4) :$- always treats next character literally: - sym = "$-".intern - assert_nothing_raised(SyntaxError) {assert_equal(sym, eval(':$-'))} - assert_nothing_raised(SyntaxError) {assert_equal(sym, eval(":$-\n"))} - assert_nothing_raised(SyntaxError) {assert_equal(sym, eval(":$- "))} - assert_nothing_raised(SyntaxError) {assert_equal(sym, eval(":$-#"))} - assert_raise(SyntaxError) {eval ':$-('} - end - - def test_inspect_number - # 5) Inconsistency between :$0 and :$1? The first one is valid, but the - # latter isn't. - assert_inspect_evaled(':$0') - assert_inspect_evaled(':$1') - end -end