<commit_before>package header

import (
	"strings"
	"testing"

	"github.com/coredns/caddy"
)

func TestSetupHeader(t *testing.T) {
	tests := []struct {
		input              string
		shouldErr          bool
		expectedErrContent string
	}{
		{`header {}`, true, "Wrong argument count or unexpected line ending after"},
		{`header {
					set
}`, true, "invalid length for flags, at least one should be provided"},
		{`header {
					foo
}`, true, "invalid length for flags, at least one should be provided"},
		{`header {
					foo bar
}`, true, "unknown flag action=foo, should be set or clear"},
		{`header {
					set ra 
}`, false, ""},<commit_msg>Clean up extra spaces (#5027)<commit_after>package header

import (
	"strings"
	"testing"

	"github.com/coredns/caddy"
)

func TestSetupHeader(t *testing.T) {
	tests := []struct {
		input              string
		shouldErr          bool
		expectedErrContent string
	}{
		{`header {}`, true, "Wrong argument count or unexpected line ending after"},
		{`header {
					set
}`, true, "invalid length for flags, at least one should be provided"},
		{`header {
					foo
}`, true, "invalid length for flags, at least one should be provided"},
		{`header {
					foo bar
}`, true, "unknown flag action=foo, should be set or clear"},
		{`header {
					set ra
}`, false, ""},
{'fraction_non_alphanumeric': 0.13236419280795717, 'fraction_numerical': 0.00306044376434583, 'mean_word_length': 3.1656050955414012, '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': '2855902', 'n_tokens_mistral': 462, 'n_tokens_neox': 407, 'n_words': 142}