]> Sergey Matveev's repositories - path-extractor.git/blobdiff - pe_test.go
Add changelog for 0.2
[path-extractor.git] / pe_test.go
index dde9cf85de6df6f8275ed7dca7f3b895521ec6a1..bc07d279b695c12fb8f8c33e1cd2cc7f6efde3be 100644 (file)
@@ -8,6 +8,26 @@ func TestEverything(t *testing.T) {
                t.Errorf("Doesnt match files", output)
        }
 
+       output = GetAllMatches("2.0G", "")
+       if len(output) != 0 {
+               t.Errorf("File size matches", output)
+       }
+
+       output = GetAllMatches("4.0K", "")
+       if len(output) != 0 {
+               t.Errorf("File size matches", output)
+       }
+
+       output = GetAllMatches("72K", "")
+       if len(output) != 0 {
+               t.Errorf("File size matches", output)
+       }
+
+       output = GetAllMatches("remotes/origin/master", "")
+       if len(output) != 0 {
+               t.Errorf("Git branch matches", output)
+       }
+
        output = GetAllMatches("I have a cat.", "")
        if len(output) != 0 {
                t.Errorf("Matches sentence", output)
@@ -112,6 +132,11 @@ func TestEverything(t *testing.T) {
                t.Errorf("Matches version number", output)
        }
 
+       output = GetAllMatches("14.22.2", "")
+       if len(output) != 0 {
+               t.Errorf("Matches version number", output)
+       }
+
        output = GetAllMatches("~/v1.2/js", "")
        if len(output) != 1 {
                t.Errorf("Should match path with version inside", output)