<commit_before>package main


import "testing" 

func TestGir(t *testing.T) {
	return
}<commit_msg>In TestGir(), load file test.gir<commit_after>package main

import (
	"bufio"
	"io"
	"os"
	"testing" 

	"github.com/bjwbell/gir/config"
	"github.com/bjwbell/gir/exec"
	"github.com/bjwbell/gir/parse"
	"github.com/bjwbell/gir/run"
	"github.com/bjwbell/gir/scan"
	"github.com/bjwbell/gir/value"
)

func TestGir(t *testing.T) {
	var (
		conf    config.Config
		context value.Context
		fd      io.Reader
		err     error
	)
	context = exec.NewContext(&conf)
	file := "test.gir"
	fd, err = os.Open(file)
	if err != nil {
		t.Fatalf("gir: %s\n", err)
	}
	scanner := scan.New(context, file, bufio.NewReader(fd))
	parser := parse.NewParser(file, scanner, context)
	interactive := false
	ok := run.Run(parser, context, interactive)
	if !ok {
		t.Errorf("Error in run.Run")
	} else {
		t.Logf("parser: %#v\n", parser)
	}
	return
}
{'fraction_non_alphanumeric': 0.16357688113413305, 'fraction_numerical': 0.0, 'mean_word_length': 3.6363636363636362, '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': '4955311', 'n_tokens_mistral': 406, 'n_tokens_neox': 387, 'n_words': 74}