]> Sergey Matveev's repositories - path-extractor.git/commitdiff
Add new test
authorEdgar HIPP <hipp.edg@gmail.com>
Sun, 30 Aug 2015 15:07:20 +0000 (17:07 +0200)
committerEdgar HIPP <hipp.edg@gmail.com>
Sun, 30 Aug 2015 15:07:20 +0000 (17:07 +0200)
pe_test.go

index 2deeae75e91b5c61daf315ccba39ec9106ee0ba6..5d447f4131a81e92a4709db8c89b6ad01f9b4377 100644 (file)
@@ -103,6 +103,16 @@ func TestEverything(t *testing.T) {
        }
 
        output = GetAllMatches("and/or", MatchOptions{})
+       if len(output) != 0 {
+               t.Errorf("Matches and/or", output[0])
+       }
+
+       output = GetAllMatches("hello user.test.js", MatchOptions{})
+       if output[0] != "user.test.js" {
+               t.Errorf("Matches date", output[0])
+       }
+
+       output = GetAllMatches(" mail@mail.com ", MatchOptions{})
        if len(output) != 0 {
                t.Errorf("Matches and/or adresses", output)
        }