<commit_before>package main

import (
	"io/ioutil"
	"os"
	"path/filepath"
	"testing"

	uuid "github.com/satori/go.uuid"
)

func TestSaveSession(t *testing.T) {
	session := "foobar"
	fp := filepath.Join(os.TempDir(), uuid.NewV4().String())
	if err := saveSession(session, fp); err != nil {
		t.Fatalf("should not be fail: %v", err)
	}
	defer func() {
		if err := os.Remove(fp); err != nil {
			t.Fatalf("should not be fail: %v", err)
		}
	}()
	f, err := os.Open(fp)
	if err != nil {
		t.Fatalf("should not be fail: %v", err)
	}
	defer func() {
		if err := f.Close(); err != nil {<commit_msg>Add TestGetMail<commit_after>package main

import (
	"io/ioutil"
	"os"
	"path/filepath"
	"testing"

	uuid "github.com/satori/go.uuid"
)

func TestGetMail(t *testing.T) {
	*commentColor = "red"
	*isAnonymous = true
	m := getMail()
	if m.CommentColor != "red" {
		t.Fatalf("want %q but %q", "red", m.CommentColor)
	}
	if !m.Is184 {
		t.Fatalf("should be true: %t", m.Is184)
	}
}

func TestSaveSession(t *testing.T) {
	session := "foobar"
	fp := filepath.Join(os.TempDir(), uuid.NewV4().String())
	if err := saveSession(session, fp); err != nil {
		t.Fatalf("should not be fail: %v", err)
	}
	defer func() {
		if err := os.Remove(fp); err != nil {
			t.Fatalf("should not be fail: %v", err)
		}
	}()
	f, err := os.Open(fp)
	if err != nil {
		t.Fatalf("should not be fail: %v", err)
	}
	defer func() {
		if err := f.Close(); err != nil {
{'fraction_non_alphanumeric': 0.19817287420941673, 'fraction_numerical': 0.005621925509486999, 'mean_word_length': 3.4779874213836477, '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': '6457017', 'n_tokens_mistral': 610, 'n_tokens_neox': 596, 'n_words': 148}