summaryrefslogtreecommitdiff
path: root/test/test_pp.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/test_pp.rb')
-rw-r--r--test/test_pp.rb13
1 files changed, 13 insertions, 0 deletions
diff --git a/test/test_pp.rb b/test/test_pp.rb
index 1809770049..604cbc509e 100644
--- a/test/test_pp.rb
+++ b/test/test_pp.rb
@@ -1,6 +1,9 @@
require 'pp'
+require 'delegate'
require 'test/unit'
+module PPTestModule
+
class PPTest < Test::Unit::TestCase
def test_list0123_12
assert_equal("[0, 1, 2, 3]\n", PP.pp([0,1,2,3], '', 12))
@@ -178,3 +181,13 @@ class PPSingleLineTest < Test::Unit::TestCase
assert_equal("[1#{', 1'*99}]", PP.singleline_pp([1]*100, ''))
end
end
+
+class PPDelegateTest < Test::Unit::TestCase
+ class A < DelegateClass(Array); end
+
+ def test_delegate
+ assert_equal("[]\n", A.new([]).pretty_inspect, "[ruby-core:25804]")
+ end
+end
+
+end