@@ -48,16 +48,16 @@ func TestTextMatcher_ValidateFails(t *testing.T) {
4848
4949func TestEqualMatcher_Validate (t * testing.T ) {
5050 m := EqualMatcher {}
51- got := m .Match (1 , 1 )
51+ got := m .Match (2 , 2 )
5252 assert .True (t , got .Success )
5353}
5454
5555func TestEqualMatcher_ValidateFails (t * testing.T ) {
5656 m := EqualMatcher {}
57- got := m .Match (1 , 0 )
57+ got := m .Match (2 , 3 )
5858 assert .False (t , got .Success )
59- assert .Contains (t , got .Diff , "+0 " )
60- assert .Contains (t , got .Diff , "-1 " )
59+ assert .Contains (t , got .Diff , "+3 " )
60+ assert .Contains (t , got .Diff , "-2 " )
6161}
6262
6363func TestContainsMatcher_Match (t * testing.T ) {
@@ -183,3 +183,19 @@ another`
183183 assert .False (t , r .Success )
184184 assert .Equal (t , diff , r .Diff )
185185}
186+
187+ func TestFileMatcher_Validate (t * testing.T ) {
188+ m := FileMatcher {}
189+ got := m .Match ("zoom" , "zoom.txt" )
190+ assert .True (t , got .Success )
191+ assert .Equal (t , "" , got .Diff )
192+ }
193+
194+ func TestFileMatcher_ValidateFails (t * testing.T ) {
195+ m := FileMatcher {}
196+ got := m .Match ("zoom" , "zoologist.txt" )
197+ assert .False (t , got .Success )
198+ println (got .Diff )
199+ assert .Contains (t , got .Diff , "+zoologist" )
200+ assert .Contains (t , got .Diff , "-zoom" )
201+ }
0 commit comments