<commit_before>package xpath

//please check the search tests in gokogiri/xml and gokogiri/html
import "testing"

func TestCompileGoodExpr(t *testing.T) {
	defer CheckXmlMemoryLeaks(t)
	e := Compile(`./*`)
	if e == nil {
		t.Error("expr should be good")
	}
}

func TestCompileBadExpr(t *testing.T) {
	defer CheckXmlMemoryLeaks(t)
	e := Compile("./")
	if e != nil {
		t.Error("expr should be bad")
	}
}
<commit_msg>should free the memory in test<commit_after>package xpath

//please check the search tests in gokogiri/xml and gokogiri/html
import "testing"

func TestCompileGoodExpr(t *testing.T) {
	defer CheckXmlMemoryLeaks(t)
	e := Compile(`./*`)
	if e == nil {
		t.Error("expr should be good")
	}
	e.Free()
}

func TestCompileBadExpr(t *testing.T) {
	defer CheckXmlMemoryLeaks(t)
	e := Compile("./")
	if e != nil {
		t.Error("expr should be bad")
	}
}

{'fraction_non_alphanumeric': 0.14385964912280702, 'fraction_numerical': 0.0, 'mean_word_length': 4.06508875739645, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6302252', 'n_tokens_mistral': 334, 'n_tokens_neox': 323, 'n_words': 88}