diff options
| author | FUKUZAWA-Tadashi <[email protected]> | 2013-03-17 21:22:21 +0900 |
|---|---|---|
| committer | Masaki Muranaka <[email protected]> | 2013-03-19 11:03:08 +0900 |
| commit | 801bc9e39e33c0ae0f76a1ffd08605d95c1dc7da (patch) | |
| tree | ef9722b6a8666f895755b076c8a866065448337e /test/t | |
| parent | e5a66685b04cc5550c1faaa0fd5fbcdba1280701 (diff) | |
| download | mruby-801bc9e39e33c0ae0f76a1ffd08605d95c1dc7da.tar.gz mruby-801bc9e39e33c0ae0f76a1ffd08605d95c1dc7da.zip | |
bugfix about escaping '\n'
Diffstat (limited to 'test/t')
| -rw-r--r-- | test/t/literals.rb | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/test/t/literals.rb b/test/t/literals.rb index 5dc15f135..5a29cff0c 100644 --- a/test/t/literals.rb +++ b/test/t/literals.rb @@ -140,6 +140,11 @@ assert('Literals Array', '8.7.6.4') do #{-1}1 2#{2} } + h = %W(a\nb + test\ abc + c\ +d + x\y x\\y x\\\y) test1 = (a == ['abc3def', '}g'] and b == ['abc', '5', 'def', '(g'] and @@ -147,7 +152,8 @@ assert('Literals Array', '8.7.6.4') do d == ['9'] and e == [] and f == ['[ab', 'cd][ef]'] and - g == ['ab', '-11', '22'] + g == ['ab', '-11', '22'] and + h == ["a\nb", 'test abc', "c\nd", "xy", "x\\y", "x\\y"] ) a = %w{abc#{1+2}def \}g} @@ -161,6 +167,11 @@ assert('Literals Array', '8.7.6.4') do #{-1}1 2#{2} } + h = %w(a\nb + test\ abc + c\ +d + x\y x\\y x\\\y) test2 = (a == ['abc#{1+2}def', '}g'] and b == ['abc', '#{2+3}', 'def', '(g'] and @@ -168,8 +179,9 @@ assert('Literals Array', '8.7.6.4') do d == ['#{4+5}'] and e == [] and f == ['[ab', 'cd][ef]'] and - g == ['ab', '#{-1}1', '2#{2}'] - ) + g == ['ab', '#{-1}1', '2#{2}'] and + h == ["a\\nb", "test abc", "c\nd", "x\\y", "x\\y", "x\\\\y"] + ) test1 and test2 end |
