<commit_before>package mmsg

import (
	"testing"
	. "github.com/github.com/mabetle/mcore/mtest"
)

func TestPutMsg(t *testing.T) {
	PutMsg("en","hello", "hello demo")
	AssertEqual(LocaleMessage("en","hello"), "hello demo")
	//default to zh, but i donot set zh key
	AssertEqual(Message("hello"), "hello demo")
}

func TestPutText(t *testing.T){
	text:=`
# this is a demo
hello2=hello demo
name=demo
	`
	PutMsgText("en", text)
	AssertEqual(Message("hello2"), "hello demo")
	AssertEqual(Message("name"), "demo")
}


func TestFile(t *testing.T) {
	LoadMessages("testdata")
	AssertEqual(LocaleMessage("en", "hello"),"Hello from English")
	AssertEqual(LocaleMessage("zh", "hello"),"Hello from Chinese, 你好")
}

<commit_msg>fix path<commit_after>package mmsg

import (
	"testing"
	. "github.com/mabetle/mcore/mtest"
)

func TestPutMsg(t *testing.T) {
	PutMsg("en","hello", "hello demo")
	AssertEqual(LocaleMessage("en","hello"), "hello demo")
	//default to zh, but i donot set zh key
	AssertEqual(Message("hello"), "hello demo")
}

func TestPutText(t *testing.T){
	text:=`
# this is a demo
hello2=hello demo
name=demo
	`
	PutMsgText("en", text)
	AssertEqual(Message("hello2"), "hello demo")
	AssertEqual(Message("name"), "demo")
}


func TestFile(t *testing.T) {
	LoadMessages("testdata")
	AssertEqual(LocaleMessage("en", "hello"),"Hello from English")
	AssertEqual(LocaleMessage("zh", "hello"),"Hello from Chinese, 你好")
}


{'fraction_non_alphanumeric': 0.17796610169491525, 'fraction_numerical': 0.002824858757062147, 'mean_word_length': 6.156565656565657, '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': '6832898', 'n_tokens_mistral': 518, 'n_tokens_neox': 514, 'n_words': 115}