<commit_before>package libstring

import (
	"encoding/json"
	"os"
	"runtime"
	"strings"
	"testing"
)

func TestReplaceTildeWithRoot(t *testing.T) {
	path := "~/resourced"
	toBeTested := strings.Replace(path, "~", "/root", 1)

	if toBeTested != "/root/resourced" {
		t.Errorf("~ is not expanded correctly. Path: %v", toBeTested)
	}
}

func TestExpandTildeAndEnv(t *testing.T) {
	toBeTested := ExpandTildeAndEnv("~/resourced")<commit_msg>this import is not used.<commit_after>package libstring

import (
	"os"
	"runtime"
	"strings"
	"testing"
)

func TestReplaceTildeWithRoot(t *testing.T) {
	path := "~/resourced"
	toBeTested := strings.Replace(path, "~", "/root", 1)

	if toBeTested != "/root/resourced" {
		t.Errorf("~ is not expanded correctly. Path: %v", toBeTested)
	}
}

func TestExpandTildeAndEnv(t *testing.T) {
	toBeTested := ExpandTildeAndEnv("~/resourced")
{'fraction_non_alphanumeric': 0.16628175519630484, 'fraction_numerical': 0.0023094688221709007, 'mean_word_length': 4.979310344827586, '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': '4710053', 'n_tokens_mistral': 348, 'n_tokens_neox': 327, 'n_words': 68}