Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
dogancanbakir committed Oct 11, 2023
1 parent 38ef937 commit 128cad8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 3 additions & 2 deletions inputs_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,10 @@ func TestExtractVar(t *testing.T) {
}{
{statement: "{{sub}}.something.{{tld}}", expected: []string{"sub", "tld"}},
{statement: "{{sub}}.{{sub1}}.{{sub2}}.{{root}}", expected: []string{"sub", "sub1", "sub2", "root"}},
{statement: "no variables", expected: []string{}},
{statement: "no variables", expected: nil},
}
for _, v := range testcases {
require.Equal(t, v.expected, getAllVars(v.statement))
actual := getAllVars(v.statement)
require.Equal(t, v.expected, actual)
}
}
2 changes: 2 additions & 0 deletions mutator_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package alterx

import (
"bytes"
"math"
"strings"
"testing"

Expand Down Expand Up @@ -39,6 +40,7 @@ func TestMutatorResults(t *testing.T) {
}
opts.Patterns = testConfig.Patterns
opts.Payloads = testConfig.Payloads
opts.MaxSize = math.MaxInt
m, err := New(opts)
require.Nil(t, err)
var buff bytes.Buffer
Expand Down

0 comments on commit 128cad8

Please sign in to comment.