diff options
Diffstat (limited to 'js/src/tests/js1_8_5/regress/regress-573875.js')
-rw-r--r-- | js/src/tests/js1_8_5/regress/regress-573875.js | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/js/src/tests/js1_8_5/regress/regress-573875.js b/js/src/tests/js1_8_5/regress/regress-573875.js new file mode 100644 index 000000000..fcfc00a9e --- /dev/null +++ b/js/src/tests/js1_8_5/regress/regress-573875.js @@ -0,0 +1,21 @@ +/* + * Any copyright is dedicated to the Public Domain. + * http://creativecommons.org/licenses/publicdomain/ + */ + +var o = {__iterator__:null, a:1, b:2, c:3} +var expect = '__iterator__,a,b,c,'; +var actual = ''; + +try { + for (var i in o) + actual += i + ','; +} catch (e) { + actual = '' + e; + if (/invalid __iterator__ value/.test(actual) || + /null is not a function/.test(actual)) { + expect = actual; + } +} + +reportCompare(expect, actual, "ok"); |