<commit_before>package dom

import (
	"testing"
)

// TestXMLNameIsValid tests whether the IsValid function on XMLName behaves as
// expected.
func TestXMLNameIsValid(t *testing.T) {
	var tests = []struct {
		element string
		actual  bool
	}{
		{"valid", true},
		{" with_leading_space", false},
		{"with space", false},
		{"åmal", true},
		{"Ball", true},
		{"éééé", true},
		{"!cruft", false},
		{"_underscore", true},
		{":element", true},
		{"abc012", true},
		{"other-element", true},
		{".dotstart", false},
		{"elem.with.dot", true},
		{"¾¾", false},
		{"Éomër-From-lord-ÖF.THERINGS", true},
		{"ALLCAPSSHOULDWORKASWELL", true},
		{"_______", true},
		{"\x00\x0A", false},
	}
<commit_msg>Extra coverage for XMLName type.<commit_after>package dom

import (
	"testing"
)

// TestXMLNameIsValid tests whether the IsValid function on XMLName behaves as
// expected.
func TestXMLNameIsValid(t *testing.T) {
	var tests = []struct {
		element string
		actual  bool
	}{
		{"", false},
		{"\xff\xfdand_the_rest", false},
		{"valid", true},
		{" with_leading_space", false},
		{"with space", false},
		{"åmal", true},
		{"Ball", true},
		{"éééé", true},
		{"!cruft", false},
		{"_underscore", true},
		{":element", true},
		{"abc012", true},
		{"other-element", true},
		{".dotstart", false},
		{"elem.with.dot", true},
		{"¾¾", false},
		{"Éomër-From-lord-ÖF.THERINGS", true},
		{"ALLCAPSSHOULDWORKASWELL", true},
		{"_______", true},
		{"\x00\x0A", false},
		{"ok\xff\xfd", false},
	}

{'fraction_non_alphanumeric': 0.2095687331536388, 'fraction_numerical': 0.008086253369272238, 'mean_word_length': 4.085616438356165, 'pattern_counts': {'":': 2, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 2, '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': '6225250', 'n_tokens_mistral': 621, 'n_tokens_neox': 561, 'n_words': 131}