summaryrefslogtreecommitdiff
path: root/test/test_pp.rb
diff options
context:
space:
mode:
authortompng <[email protected]>2024-10-09 13:31:48 +0900
committergit <[email protected]>2024-11-19 14:52:01 +0000
commit7b51b3c75b503de744b5988619915033a3a9b7ff (patch)
treee533d69ccaf6f3365d132f6cf06a20d0b9b39c16 /test/test_pp.rb
parent0de7e6ccb02dad6b067c29e4b6fdce0c3938bad5 (diff)
[ruby/pp] Fix pretty printing range begin/end with false or nil
https://github.com/ruby/pp/commit/6d9c0f255a
Diffstat (limited to 'test/test_pp.rb')
-rw-r--r--test/test_pp.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/test/test_pp.rb b/test/test_pp.rb
index 16f6fa7485..2646846d8b 100644
--- a/test/test_pp.rb
+++ b/test/test_pp.rb
@@ -34,6 +34,10 @@ class PPTest < Test::Unit::TestCase
assert_equal("0...1\n", PP.pp(0...1, "".dup))
assert_equal("0...\n", PP.pp(0..., "".dup))
assert_equal("...1\n", PP.pp(...1, "".dup))
+ assert_equal("..false\n", PP.pp(..false, "".dup))
+ assert_equal("false..\n", PP.pp(false.., "".dup))
+ assert_equal("false..false\n", PP.pp(false..false, "".dup))
+ assert_equal("nil..nil\n", PP.pp(nil..nil, "".dup))
end
end