5 func TestGitIgnore(t *testing.T) {
6 output := GetAllMatches("?? alt/generateStore.php")
7 if output[0] != "alt/generateStore.php" {
8 t.Errorf("Doesnt match files", output[0])
11 output = GetAllMatches("hello .gitignore")
12 if output[0] != ".gitignore" {
13 t.Errorf("Doesnt match hidden files", output[0])
16 output = GetAllMatches(" mail@mail.com ")
18 t.Errorf("Matches email adresses", output[0])
21 output = GetAllMatches("v1.2")
23 t.Errorf("Matches version number", output[0])
26 output = GetAllMatches("obj.slice()")
28 t.Errorf("Matches function call", output[0])
31 output = GetAllMatches("~/www")
32 if len(output) == 0 || output[0] != "~/www" {
33 t.Errorf("Doesnt match home", output[0])
36 output = GetAllMatches("origin/master")
38 t.Errorf("Matches remote name", output[0])
41 output = GetAllMatches("john doe (dead on 28/04/2014)")
43 t.Errorf("Matches date", output[0])
46 output = GetAllMatches("john doe ,dead on 28/04/2014")
48 t.Errorf("Matches date", output[0])
51 output = GetAllMatches(".gitignore , ~/www")
53 t.Errorf("Doesnt match multi", output[0])
56 output = GetAllMatches("var/")
58 t.Errorf("Doesnt match dir", output[0])
61 output = GetAllMatches("//")
63 t.Errorf("Comment matches", output[0])