mirror of
https://github.com/projectdiscovery/nuclei.git
synced 2025-12-18 00:25:26 +00:00
13 lines
328 B
Go
13 lines
328 B
Go
|
|
package replacer
|
||
|
|
|
||
|
|
import (
|
||
|
|
"testing"
|
||
|
|
|
||
|
|
"github.com/stretchr/testify/require"
|
||
|
|
)
|
||
|
|
|
||
|
|
func TestReplacerReplace(t *testing.T) {
|
||
|
|
replaced := Replace("{{test}} §hello§ {{data}}", map[string]interface{}{"test": "random", "hello": "world"})
|
||
|
|
require.Equal(t, "random world {{data}}", replaced, "could not get correct replaced data")
|
||
|
|
}
|