(_stringLiteral, _nonStrictResult, _strictResult)
| 26 | ); |
| 27 | |
| 28 | function test(_stringLiteral, _nonStrictResult, _strictResult) |
| 29 | { |
| 30 | stringLiteral = '"' + _stringLiteral + '"'; |
| 31 | nonStrictResult = _nonStrictResult; |
| 32 | shouldBe("eval(stringLiteral)", "nonStrictResult"); |
| 33 | |
| 34 | stringLiteral = '"use strict"; ' + stringLiteral; |
| 35 | if (_strictResult) { |
| 36 | strictResult = _strictResult; |
| 37 | shouldBe("eval(stringLiteral)", "strictResult"); |
| 38 | } else |
| 39 | shouldThrow("eval(stringLiteral)"); |
| 40 | } |
| 41 | |
| 42 | // Tests for single digit octal and decimal escapes. |
| 43 | // In non-strict mode 0-7 are octal escapes, 8-9 are NonEscapeCharacters. |
no test coverage detected