Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

test-bad-unicode: update to reflect V8 3.11 behavior

  • Loading branch information...
commit 34b0b6a6133ef70878c426af0812308869b5493b 1 parent 39d2337
Bert Belder piscisaureus authored
Showing with 9 additions and 4 deletions.
  1. +9 −4 test/simple/test-bad-unicode.js
13 test/simple/test-bad-unicode.js
View
@@ -18,9 +18,14 @@
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
// USE OR OTHER DEALINGS IN THE SOFTWARE.
-var assert = require('assert');
-var bad_unicode = '\uc/ef';
-console.log(bad_unicode);
+var assert = require('assert'),
+ exception = null;
-assert.equal(bad_unicode, "uc/ef");
+try {
+ eval('"\\uc/ef"');
+} catch (e) {
+ exception = e;
+}
+
+assert(exception instanceof SyntaxError);
Please sign in to comment.
Something went wrong with that request. Please try again.