Add String#rjust test to mruby-string-ext

This commit is contained in:
Akira Moroo
2016-01-30 14:28:00 +09:00
parent e86bc6bb47
commit cb1a80e741
+7
View File
@@ -421,6 +421,13 @@ assert('String#ljust') do
assert_equal "hello", "hello".ljust(-3)
end
assert('String#rjust') do
assert_equal "hello", "hello".rjust(4)
assert_equal " hello", "hello".rjust(20)
assert_equal "123412341234123hello", "hello".rjust(20, '1234')
assert_equal "hello", "hello".rjust(-3)
end
assert('String#upto') do
a = "aa"
start = "aa"