<commit_before>package main

import (
	"fmt"
	"reflect"
	"testing"
)

func newEventMap() map[int]map[string]string {
	mappy := map[int]map[string]string{
		1234: make(map[string]string),
		//1235: map[string]string{"hi": "bye"},
	}
	return mappy
}

/*Test that event has info added*/
func Test_makeJsonString(t *testing.T) {
	m := newEventMap()
	makeJsonString(m, 1300, "audit(1446832550.594:1234): blah=blah")

	if !reflect.DeepEqual(m[1234], map[string]string{
		"blah":         "blah",
		"auditd_seq":   "1234",
		"netlink_type": "1300",
	}) {
		t.Error()
	}
}

/*Test that event disappears properly when EOE (1320) is received*/
func Test_makeJsonString_EOE(t *testing.T) {
	m := newEventMap()
	makeJsonString(m, 1320, "audit(1446832550.594:1234): blah=blah")

	fmt.Println(m)
	if _, ok := m[1234]; ok {
		t.Error()
	}
}
<commit_msg>remove debug<commit_after>package main

import (
	"reflect"
	"testing"
)

func newEventMap() map[int]map[string]string {
	mappy := map[int]map[string]string{
		1234: make(map[string]string),
		//1235: map[string]string{"hi": "bye"},
	}
	return mappy
}

/*Test that event has info added*/
func Test_makeJsonString(t *testing.T) {
	m := newEventMap()
	makeJsonString(m, 1300, "audit(1446832550.594:1234): blah=blah")

	if !reflect.DeepEqual(m[1234], map[string]string{
		"blah":         "blah",
		"auditd_seq":   "1234",
		"netlink_type": "1300",
	}) {
		t.Error()
	}
}

/*Test that event disappears properly when EOE (1320) is received*/
func Test_makeJsonString_EOE(t *testing.T) {
	m := newEventMap()
	makeJsonString(m, 1320, "audit(1446832550.594:1234): blah=blah")

	if _, ok := m[1234]; ok {
		t.Error()
	}
}

{'fraction_non_alphanumeric': 0.17636363636363636, 'fraction_numerical': 0.08484848484848485, 'mean_word_length': 4.673539518900344, 'pattern_counts': {'":': 8, '<': 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': '6301222', 'n_tokens_mistral': 786, 'n_tokens_neox': 665, 'n_words': 135}