summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorSHIBATA Hiroshi <hsbt@ruby-lang.org>2016-02-23 14:06:54 +0900
committerSHIBATA Hiroshi <hsbt@ruby-lang.org>2016-02-23 14:06:54 +0900
commit0628044c5d8a64f4160747e00476b97402e2d565 (patch)
treecb93864d68dca0527f175162261164f7cf951e33 /test
parent8d3a63e7e8480d987a916d1ca46ece0d5e071c9d (diff)
downloadpsych-0628044c5d8a64f4160747e00476b97402e2d565.zip
cherry-picked test from https://github.com/ruby/ruby/commit/db48c307944a9a18877236bdf9e9b778875f38ed
Diffstat (limited to 'test')
-rw-r--r--test/psych/test_emitter.rb15
1 files changed, 15 insertions, 0 deletions
diff --git a/test/psych/test_emitter.rb b/test/psych/test_emitter.rb
index 1c96c12..40826de 100644
--- a/test/psych/test_emitter.rb
+++ b/test/psych/test_emitter.rb
@@ -89,5 +89,20 @@ module Psych
@emitter.start_sequence(nil, nil, true, :foo)
end
end
+
+ def test_resizing_tags
+ tags = []
+ version = [1,1]
+ obj = Object.new
+ obj.instance_variable_set(:@tags, tags)
+ def obj.to_str
+ (1..10).map{|x| @tags.push(["AAAA","BBBB"])}
+ return "x"
+ end
+
+ tags.push([obj, "tag:TALOS"])
+ @emitter.start_document(version, tags, 0)
+ assert(true)
+ end
end
end