summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/-ext-/string/test_cstr.rb12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/-ext-/string/test_cstr.rb b/test/-ext-/string/test_cstr.rb
index f691da6f79..1809fa186a 100644
--- a/test/-ext-/string/test_cstr.rb
+++ b/test/-ext-/string/test_cstr.rb
@@ -39,4 +39,16 @@ class Test_StringCStr < Test::Unit::TestCase
assert_equal(0, s.cstr_term)
end
end
+
+ def test_wchar_lstrip!
+ str = Bug::String.new(" a".encode(Encoding::UTF_16BE))
+ str.lstrip!
+ assert_nil(str.cstr_term_char)
+ end
+
+ def test_wchar_rstrip!
+ str = Bug::String.new("a ".encode(Encoding::UTF_16BE))
+ str.rstrip!
+ assert_nil(str.cstr_term_char)
+ end
end