Skip to content

Commit

Permalink
Add String#rjust test to mruby-string-ext
Browse files Browse the repository at this point in the history
  • Loading branch information
retrage committed Jan 30, 2016
1 parent e86bc6b commit cb1a80e
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions mrbgems/mruby-string-ext/test/string.rb
Original file line number Diff line number Diff line change
Expand Up @@ -421,6 +421,13 @@ def o.to_str
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"
Expand Down

0 comments on commit cb1a80e

Please sign in to comment.