summaryrefslogtreecommitdiffstats
path: root/js/src/tests/js1_5/Regress/regress-173067.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/src/tests/js1_5/Regress/regress-173067.js')
-rw-r--r--js/src/tests/js1_5/Regress/regress-173067.js25
1 files changed, 25 insertions, 0 deletions
diff --git a/js/src/tests/js1_5/Regress/regress-173067.js b/js/src/tests/js1_5/Regress/regress-173067.js
new file mode 100644
index 000000000..9b8542ccd
--- /dev/null
+++ b/js/src/tests/js1_5/Regress/regress-173067.js
@@ -0,0 +1,25 @@
+// |reftest| skip -- obsolete test
+/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+//-----------------------------------------------------------------------------
+var BUGNUMBER = 173067;
+var summary = 'Properly report / in a literal regexp class as an error';
+var actual = '';
+var expect = 'SyntaxError: unterminated character class ';
+
+printBugNumber(BUGNUMBER);
+printStatus (summary);
+
+try
+{
+ var re = eval('/[/]/');
+}
+catch(e)
+{
+ actual = e.toString();
+}
+
+reportCompare(expect, actual, summary);