Skip to content

Commit 49ee42e

Browse files
committed
Move regex setup scripts into TestRegex
1 parent acbdefd commit 49ee42e

File tree

2 files changed

+7
-8
lines changed

2 files changed

+7
-8
lines changed

enginetest/engine_only_test.go

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -717,7 +717,13 @@ func TestCollationCoercion(t *testing.T) {
717717

718718
func TestRegex(t *testing.T) {
719719
harness := enginetest.NewDefaultMemoryHarness()
720-
setupsScripts := append(setup.SimpleSetup, queries.RegexSetup)
720+
regexSetup := []setup.SetupScript{
721+
{
722+
"CREATE TABLE tests(pk int primary key, str text, pattern text, flags text);",
723+
"INSERT INTO tests VALUES (1, 'testing', 'TESTING', 'ci');",
724+
},
725+
}
726+
setupsScripts := append(setup.SimpleSetup, regexSetup)
721727
harness.Setup(setupsScripts...)
722728
engine, err := harness.NewEngine(t)
723729
require.NoError(t, err)

enginetest/queries/regex_queries.go

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -34,13 +34,6 @@ type RegexTest struct {
3434
ExpectedErr *errors.Kind
3535
}
3636

37-
var RegexSetup = []setup.SetupScript{
38-
{
39-
"CREATE TABLE tests(pk int primary key, str text, pattern text, flags text);",
40-
"INSERT INTO tests VALUES (1, 'testing', 'TESTING', 'ci');",
41-
},
42-
}
43-
4437
var RegexTests = []RegexTest{
4538
{
4639
Query: "SELECT REGEXP_LIKE('testing', 'TESTING');",

0 commit comments

Comments
 (0)