aboutsummaryrefslogtreecommitdiff
path: root/plugin/test/brackets.test.js
diff options
context:
space:
mode:
Diffstat (limited to 'plugin/test/brackets.test.js')
-rw-r--r--plugin/test/brackets.test.js9
1 files changed, 6 insertions, 3 deletions
diff --git a/plugin/test/brackets.test.js b/plugin/test/brackets.test.js
index e144335..a62e657 100644
--- a/plugin/test/brackets.test.js
+++ b/plugin/test/brackets.test.js
@@ -24,8 +24,11 @@ test('comments and quotes are ignored with correct UTF-16 offsets after Unicode
assert.deepEqual(unmatchedBrackets(unfinished), [unfinished.length - 1]);
const unicode = 'OUTPUT "Hello๐Ÿ˜€"\r\nA[';
assert.deepEqual(unmatchedBrackets(unicode), [unicode.length - 1]);
- // Backslashes do not escape CIE quotes.
- assert.deepEqual(unmatchedBrackets('"x\\"['), [4]);
- const quoteChar = "OUTPUT ''' [";
+ assert.deepEqual(unmatchedBrackets(String.raw`OUTPUT "x\"[(//"`), []);
+ const backslash = String.raw`OUTPUT "x\\" [`;
+ assert.deepEqual(unmatchedBrackets(backslash), [backslash.length - 1]);
+ const quoteChar = String.raw`OUTPUT '\'' [`;
assert.deepEqual(unmatchedBrackets(quoteChar), [quoteChar.length - 1]);
+ const escaped = 'OUTPUT "๐Ÿ˜€\\"["\r\nA[';
+ assert.deepEqual(unmatchedBrackets(escaped), [escaped.length - 1]);
});