package sanitize import ( "testing" "github.com/stretchr/testify/assert" ) func TestQuery(t *testing.T) { t.Run("Replace", func(t *testing.T) { q := Query("table spoon & usa | img% json OR BILL!\n") assert.Equal(t, "table spoon & usa | img* json|BILL!", q) }) t.Run("AndOr", func(t *testing.T) { q := Query("Jens AND Mander and me Or Kitty AND ") assert.Equal(t, "Jens&Mander&me|Kitty", q) }) }