<commit_before>package pathutil 

import (
	pathlib "path"
	"fmt"
	"os/user"
	"testing"
)

func TestExpand(t *testing.T) {
	usr, _ := user.Current()
	home := usr.HomeDir
	cases := []struct {
		in, want string
	}{
		{"", ""},
		{"~", "~"},
		{"~/", home},
		{"a/~/b", "a/~/b"},
		{"~/b", pathlib.Join(home, "b")},
	}
	for _, c := range cases {
		fmt.Printf("Testing Expand(%s)\n", c.in)
		got := Expand(c.in)
		if got != c.want {
			t.Errorf("Expand(%q) wanted %q, got %q", c.in, c.want, got)
		}
	}
}<commit_msg>Exists tests<commit_after>package pathutil 

import (
	pathlib "path"
	"fmt"
	"os/user"
	"testing"
)

func TestExpand(t *testing.T) {
	usr, _ := user.Current()
	home := usr.HomeDir
	cases := []struct {
		in, want string
	}{
		{"", ""},
		{"~", "~"},
		{"~/", home},
		{"a/~/b", "a/~/b"},
		{"~/b", pathlib.Join(home, "b")},
	}
	for _, c := range cases {
		fmt.Printf("Testing Expand(%s)\n", c.in)
		got := Expand(c.in)
		if got != c.want {
			t.Errorf("Expand(%q) wanted %q, got %q", c.in, c.want, got)
		}
	}
}

func TestExists(t *testing.T) {
	usr, _ := user.Current()
	home := usr.HomeDir
	cases := []struct {
		in string
		want bool
	}{
		{"", false},
		{home, true},
		{"nonsense", false},
	}
	for _, c := range cases {
		fmt.Printf("Testing Exists(%s)\n", c.in)
		got := Exists(c.in)
		if got != c.want {
			t.Errorf("Exists(%q) wanted %q, got %q", c.in, c.want, got)
		}
	}
}
{'fraction_non_alphanumeric': 0.2503586800573888, 'fraction_numerical': 0.0, 'mean_word_length': 3.0086206896551726, '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': '2832158', 'n_tokens_mistral': 663, 'n_tokens_neox': 612, 'n_words': 131}