8000 fixes #83 - fix dot when using EcmaScript and Singleline options toge… · dlclark/regexp2@636cbb0 · GitHub
[go: up one dir, main page]

Skip to content

Commit 636cbb0

Browse files
committed
fixes #83 - fix dot when using EcmaScript and Singleline options together
1 parent 30daa31 commit 636cbb0

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

regexp_test.go

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1364,3 +1364,15 @@ func TestUnMarshal(t *testing.T) {
13641364
t.Fatalf(`Expected match`)
13651365
}
13661366
}
1367+
1368+
func TestRegexpECMAScriptWithSingleline(t *testing.T) {
1369+
re := MustCompile(`.`, Singleline)
1370+
if isMatch, _ := re.MatchString("\n"); !isMatch {
1371+
t.Fatal("Expected match")
1372+
}
1373+
1374+
re = MustCompile(`.`, ECMAScript|Singleline)
1375+
if isMatch, _ := re.MatchString("\n"); !isMatch {
1376+
t.Fatal("Expected match")
1377+
}
1378+
}

0 commit comments

Comments
 (0)
0