From 34b0b6a6133ef70878c426af0812308869b5493b Mon Sep 17 00:00:00 2001 From: Bert Belder Date: Thu, 14 Jun 2012 16:06:53 +0200 Subject: [PATCH] test-bad-unicode: update to reflect V8 3.11 behavior --- test/simple/test-bad-unicode.js | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/test/simple/test-bad-unicode.js b/test/simple/test-bad-unicode.js index 60e3c36..0e57909 100644 --- a/test/simple/test-bad-unicode.js +++ b/test/simple/test-bad-unicode.js @@ -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); -- 2.7.4