We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent cd5b3e0 commit ac324c4Copy full SHA for ac324c4
spec/test-scan.js
@@ -0,0 +1,12 @@
1
+'use strict'
2
+
3
+const OnigString = require('..').OnigString
4
+const OnigScanner = require('..').OnigScanner
5
6
+describe('Scanner', () => {
7
+ it('does not throw on PHP regexp from issue #17', () => {
8
+ const scanner = new OnigScanner(["(?i)^\\s*(trait)\\s+([a-z_\\x{7f}-\\x{7fffffff}][a-z0-9_\\x{7f}-\\x{7fffffff}]*)"]);
9
+ const res = scanner.findNextMatchSync(new OnigString("trait test {\n"), 0);
10
+ expect(res.captureIndices[1].start).toBe(0)
11
+ })
12
+});
0 commit comments