From ab4f110ea4e68aea09eb6b4da01d281c0a941ec9 Mon Sep 17 00:00:00 2001 From: Stephen Birarda Date: Thu, 22 Mar 2018 11:07:06 -0700 Subject: [PATCH] add single quote tests to JS baking tests --- tests/baking/src/JSBakerTest.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/baking/src/JSBakerTest.cpp b/tests/baking/src/JSBakerTest.cpp index 082ffb047f..e39ccc6b9a 100644 --- a/tests/baking/src/JSBakerTest.cpp +++ b/tests/baking/src/JSBakerTest.cpp @@ -66,12 +66,14 @@ void JSBakerTest::setTestCases() { _testCases.emplace_back("'abcd1234$%^&[](){}'\na", "'abcd1234$%^&[](){}'\na"); _testCases.emplace_back("\"abcd1234$%^&[](){}\"\na", "\"abcd1234$%^&[](){}\"\na"); _testCases.emplace_back("`abcd1234$%^&[](){}`\na", "`abcd1234$%^&[](){}`a"); + _testCases.emplace_back("\' \';", "\' \';"); + _testCases.emplace_back("\'//single line comment\nvar b=2;\';", "\'//single line comment\nvar b=2;\';"); // Edge Cases //No semicolon to terminate an expression, instead a new line used for termination _testCases.emplace_back("var x=5\nvar y=6;", "var x=5\nvar y=6;"); - + //a + ++b is minified as a+ ++b. _testCases.emplace_back("a + ++b", "a + ++b");