test262/website/resources/scripts/testcases/15.4.4.4.json

1 line
2.0 KiB
JSON
Raw Normal View History

{"testsCollection":{"name":"Chapter - 15.4.4.4","numTests":"1","tests":[{"code":"RVM1SGFybmVzcy5yZWdpc3RlclRlc3QoewogICAgaWQ6ICIxNS40LjQuNC01LWItaWlpLTMtYi0xIiwKCiAgICBwYXRoOiAiVGVzdENhc2VzL2NoYXB0ZXIxNS8xNS40LzE1LjQuNC8xNS40LjQuNC8xNS40LjQuNC01LWItaWlpLTMtYi0xLmpzIiwKCiAgICBkZXNjcmlwdGlvbjogIkFycmF5LnByb3RvdHlwZS5jb25jYXQgd2lsbCBjb25jYXQgYW4gQXJyYXkgd2hlbiBpbmRleCBwcm9wZXJ0eSAocmVhZC1vbmx5KSBleGlzdHMgaW4gQXJyYXkucHJvdG90eXBlIChTdGVwIDUuYi5paWkuMy5iKSIsCgogICAgdGVzdDogZnVuY3Rpb24gdGVzdGNhc2UoKSB7CiAgICAgICAgdHJ5IHsKICAgICAgICAgICAgT2JqZWN0LmRlZmluZVByb3BlcnR5KEFycmF5LnByb3RvdHlwZSwgIjAiLCB7CiAgICAgICAgICAgICAgICB2YWx1ZTogMTAwLAogICAgICAgICAgICAgICAgd3JpdGFibGU6IGZhbHNlLAogICAgICAgICAgICAgICAgY29uZmlndXJhYmxlOiB0cnVlCiAgICAgICAgICAgIH0pOwoKICAgICAgICAgICAgdmFyIG9sZEFyciA9IFsxMDFdOwoKICAgICAgICAgICAgdmFyIG5ld0FyciA9IEFycmF5LnByb3RvdHlwZS5jb25jYXQuY2FsbChvbGRBcnIpOwoKICAgICAgICAgICAgdmFyIHZlcmlmeVZhbHVlID0gZmFsc2U7CiAgICAgICAgICAgIHZlcmlmeVZhbHVlID0gbmV3QXJyWzBdID09PSAxMDE7CgogICAgICAgICAgICB2YXIgdmVyaWZ5RW51bWVyYWJsZSA9IGZhbHNlOwogICAgICAgICAgICBmb3IgKHZhciBwIGluIG5ld0FycikgewogICAgICAgICAgICAgICAgaWYgKHAgPT09ICIwIiAmJiBuZXdBcnIuaGFzT3duUHJvcGVydHkoIjAiKSkgewogICAgICAgICAgICAgICAgICAgIHZlcmlmeUVudW1lcmFibGUgPSB0cnVlOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9CgogICAgICAgICAgICB2YXIgdmVyaWZ5V3JpdGFibGUgPSBmYWxzZTsKICAgICAgICAgICAgbmV3QXJyWzBdID0gMTI7CiAgICAgICAgICAgIHZlcmlmeVdyaXRhYmxlID0gbmV3QXJyWzBdID09PSAxMjsKCiAgICAgICAgICAgIHZhciB2ZXJpZnlDb25maWd1cmFibGUgPSBmYWxzZTsKICAgICAgICAgICAgZGVsZXRlIG5ld0FyclswXTsKICAgICAgICAgICAgdmVyaWZ5Q29uZmlndXJhYmxlID0gbmV3QXJyLmhhc093blByb3BlcnR5KCIwIik7CgogICAgICAgICAgICByZXR1cm4gdmVyaWZ5VmFsdWUgJiYgIXZlcmlmeUNvbmZpZ3VyYWJsZSAmJiB2ZXJpZnlFbnVtZXJhYmxlICYmIHZlcmlmeVdyaXRhYmxlOwogICAgICAgIH0gZmluYWxseSB7CiAgICAgICAgICAgIGRlbGV0ZSBBcnJheS5wcm90b3R5cGVbMF07CiAgICAgICAgfQogICAgfSwKCiAgICBwcmVjb25kaXRpb246IGZ1bmN0aW9uIHByZXJlcSgpIHsKICAgICAgICByZXR1cm4gZm5FeGlzdHMoT2JqZWN0LmRlZmluZVByb3BlcnR5KTsKICAgIH0KfSk7Cg==","id":"15.4.4.4-5-b-iii-3-b-1"}]}}