aboutsummaryrefslogtreecommitdiffstats
path: root/test/ruby/test_string.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/ruby/test_string.rb')
-rw-r--r--test/ruby/test_string.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/ruby/test_string.rb b/test/ruby/test_string.rb
index f907a28f99..96137e3de9 100644
--- a/test/ruby/test_string.rb
+++ b/test/ruby/test_string.rb
@@ -2137,10 +2137,16 @@ class TestString < Test::Unit::TestCase
end
def test_rstrip
+ assert_equal(" hello", " hello ".rstrip)
assert_equal("\u3042", "\u3042 ".rstrip)
assert_raise(Encoding::CompatibilityError) { "\u3042".encode("ISO-2022-JP").rstrip }
end
+ def test_lstrip
+ assert_equal("hello ", " hello ".lstrip)
+ assert_equal("\u3042", " \u3042".lstrip)
+ end
+
=begin
def test_symbol_table_overflow
assert_in_out_err([], <<-INPUT, [], /symbol table overflow \(symbol [a-z]{8}\) \(RuntimeError\)/)