diff options
| author | takahashim <[email protected]> | 2015-01-12 22:16:29 +0900 |
|---|---|---|
| committer | takahashim <[email protected]> | 2015-01-12 22:16:29 +0900 |
| commit | 1b606025ed1a9813267bf8ac4440fc9dd5fc120c (patch) | |
| tree | e544bcaf928c40eeded5d83dd78d3254bf6f3de4 /mrbgems/mruby-string-ext/test | |
| parent | 3c41ad4018b1a230ea3d2a94932853909a274657 (diff) | |
| download | mruby-1b606025ed1a9813267bf8ac4440fc9dd5fc120c.tar.gz mruby-1b606025ed1a9813267bf8ac4440fc9dd5fc120c.zip | |
add String#ljust into mruby-string-ext
Diffstat (limited to 'mrbgems/mruby-string-ext/test')
| -rw-r--r-- | mrbgems/mruby-string-ext/test/string.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/mrbgems/mruby-string-ext/test/string.rb b/mrbgems/mruby-string-ext/test/string.rb index 9fa835249..83e69859b 100644 --- a/mrbgems/mruby-string-ext/test/string.rb +++ b/mrbgems/mruby-string-ext/test/string.rb @@ -386,3 +386,10 @@ assert('String#prepend') do assert_equal "hello world", a.prepend("hello ") assert_equal "hello world", a end + +assert('String#ljust') do + assert_equal "hello", "hello".ljust(4) + assert_equal "hello ", "hello".ljust(20) + assert_equal "hello123412341234123", "hello".ljust(20, '1234') + assert_equal "hello", "hello".ljust(-3) +end |
