Merge pull request #12696 from birarda/add-js-baker-quote-tests

add single quote tests to JS baking tests
This commit is contained in:
Stephen Birarda 2018-04-17 18:02:34 -07:00 committed by GitHub
commit 0a1f07755e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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");