<commit_before>// SPDX-License-Identifier: MIT

package doctest

import (
	"path/filepath"
	"testing"

	"github.com/issue9/assert"
)

func TestPath(t *testing.T) {
	a := assert.New(t)

	p1, err := filepath.Abs(Filename)
	a.NotError(err).NotEmpty(p1)

	p2, err := filepath.Abs(Path(a))
	a.NotError(err).NotEmpty(p2)

	a.Equal(p1, p2)
}
<commit_msg>fix(doc/doctest): 添加测试用例<commit_after>// SPDX-License-Identifier: MIT

package doctest

import (
	"path/filepath"
	"testing"

	"github.com/issue9/assert"
)

func TestXML(t *testing.T) {
	a := assert.New(t)
	data := XML(a)
	a.NotNil(data)
}

func TestPath(t *testing.T) {
	a := assert.New(t)

	p1, err := filepath.Abs(Filename)
	a.NotError(err).NotEmpty(p1)

	p2, err := filepath.Abs(Path(a))
	a.NotError(err).NotEmpty(p2)

	a.Equal(p1, p2)
}

{'fraction_non_alphanumeric': 0.18250950570342206, 'fraction_numerical': 0.017743979721166033, 'mean_word_length': 4.266666666666667, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, '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': '4482753', 'n_tokens_mistral': 369, 'n_tokens_neox': 361, 'n_words': 57}