From 14e3d035de379813f6663c3a12620b8b5feef9a6 Mon Sep 17 00:00:00 2001 From: Krzysztof Kiewicz Date: Sat, 28 Dec 2024 16:05:06 +0100 Subject: [PATCH] Unskip 1 test --- quesma/quesma/search_test.go | 3 --- quesma/testdata/requests.go | 6 ++++-- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/quesma/quesma/search_test.go b/quesma/quesma/search_test.go index f740085ed..aed2620cd 100644 --- a/quesma/quesma/search_test.go +++ b/quesma/quesma/search_test.go @@ -299,9 +299,6 @@ func TestSearchHandler(t *testing.T) { for i, tt := range testdata.TestsSearch { t.Run(fmt.Sprintf("%s(%d)", tt.Name, i), func(t *testing.T) { - if i == 37 { - t.Skip("Regexp seems to be broken because of some transformations") - } var db *sql.DB var mock sqlmock.Sqlmock if len(tt.WantedRegexes) > 0 { diff --git a/quesma/testdata/requests.go b/quesma/testdata/requests.go index 573d74217..ea694aab3 100644 --- a/quesma/testdata/requests.go +++ b/quesma/testdata/requests.go @@ -2254,12 +2254,14 @@ var TestsSearch = []SearchTestCase{ }, "track_total_hits": false }`, - []string{`"field" LIKE '%\\___'`}, // escaping _ twice ("\\_") seemed wrong, but it actually works in Clickhouse! + // Escaping _ twice ("\\_") seemed wrong, but it actually works in Clickhouse! + // \\\\ means 2 escaped backslashes, actual returned string is "\\" + []string{`"field" LIKE '%\\___'`}, model.ListAllFields, []string{ `SELECT "message" ` + `FROM ` + TableName + ` ` + - `WHERE "field" LIKE '%\\___' ` + + `WHERE "field" LIKE '%\\\\___' ` + `LIMIT 10`, }, []string{},