diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b742ac328..15ffee666 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -22,7 +22,10 @@ jobs: fuzz-test: name: fuzz test runs-on: ubuntu-latest + container: alpine:edge steps: + - name: add dependencies + run: apk add bash go # Pinned a commit to make go version configurable. # This should be safe to upgrade once this commit is in a released version: # https://github.com/jidicula/go-fuzz-action/commit/23cc553941669144159507e2cccdbb4afc5b3076 diff --git a/.tool-versions b/.tool-versions index ff2d56269..6bc74c519 100644 --- a/.tool-versions +++ b/.tool-versions @@ -1 +1 @@ -golang 1.21.2 +golang 1.22.1 diff --git a/go.mod b/go.mod index 848184d76..35b9d6a91 100644 --- a/go.mod +++ b/go.mod @@ -138,4 +138,4 @@ require ( gopkg.in/yaml.v3 v3.0.1 // indirect ) -go 1.21 +go 1.22 diff --git a/matchtree.go b/matchtree.go index 61d7c84d2..dd1256500 100644 --- a/matchtree.go +++ b/matchtree.go @@ -1115,7 +1115,7 @@ func (d *indexData) newMatchTree(q query.Q, opt matchTreeOpt) (matchTree, error) return &symbolRegexpMatchTree{ regexp: regexp, - all: regexp.String() == "(?i)(?-s:.)*", + all: regexp.String() == "(?i)(?-s:.*)", matchTree: subMT, }, nil diff --git a/matchtree_test.go b/matchtree_test.go index c7588c2d4..9a7362d92 100644 --- a/matchtree_test.go +++ b/matchtree_test.go @@ -237,9 +237,9 @@ func TestSymbolMatchTree(t *testing.T) { regex string regexAll bool }{ - {query: "sym:.*", regex: "(?i)(?-s:.)*", regexAll: true}, + {query: "sym:.*", regex: "(?i)(?-s:.*)", regexAll: true}, {query: "sym:(ab|cd)", regex: "(?i)ab|cd"}, - {query: "sym:b.r", regex: "(?i)b(?-s:.)r"}, + {query: "sym:b.r", regex: "(?i)(?-s:b.r)"}, {query: "sym:horse", substr: "horse"}, {query: `sym:\bthread\b case:yes`, regex: `\bthread\b`}, // check we disable word search opt {query: `sym:\bthread\b case:no`, regex: `(?i)\bthread\b`},