@@ -16,7 +16,7 @@ public void Basic()
16
16
{
17
17
Assert . That ( FindCommonSuffix ( "01]" , "02]" ) , Is . EqualTo ( "]" ) ) ;
18
18
Assert . That ( FindCommonSuffix ( "01]end" , "02]end" ) , Is . EqualTo ( "]" ) ) ;
19
- Assert . That ( FindCommonSuffix ( " 01 ] end" , " 02 ] end" ) , Is . EqualTo ( "] " ) ) ;
19
+ Assert . That ( FindCommonSuffix ( " 01 ] end" , " 02 ] end" ) , Is . EqualTo ( " " ) ) ;
20
20
}
21
21
22
22
[ Test ]
@@ -30,15 +30,15 @@ public void SkipMatchCharacter()
30
30
Assert . That ( FindCommonSuffix ( "01a" , "02a" ) , Is . EqualTo ( "" ) , "should skip Lowercase Letter, then no match" ) ;
31
31
Assert . That ( FindCommonSuffix ( "01a]" , "02a]" ) , Is . EqualTo ( "]" ) , "should skip Lowercase Letter, then match" ) ;
32
32
33
- Assert . That ( FindCommonSuffix ( "01 " , "02 " ) , Is . EqualTo ( "" ) , "should skip Whitespace, then no match" ) ;
34
- Assert . That ( FindCommonSuffix ( "01 ]" , "02 ]" ) , Is . EqualTo ( "] " ) , "should skip Whitespace, then match" ) ;
33
+ Assert . That ( FindCommonSuffix ( "01 " , "02 " ) , Is . EqualTo ( " " ) , "should not skip Whitespace, then match" ) ;
34
+ Assert . That ( FindCommonSuffix ( "01 ]" , "02 ]" ) , Is . EqualTo ( " " ) , "should not skip Whitespace, then match" ) ;
35
35
}
36
36
37
37
[ Test ]
38
38
public void NoCommon ( )
39
39
{
40
40
Assert . That ( FindCommonSuffix ( "01$" , "02]" ) , Is . EqualTo ( "" ) ) ;
41
- Assert . That ( FindCommonSuffix ( "01 abc " , "02 def " ) , Is . EqualTo ( "" ) ) ;
41
+ Assert . That ( FindCommonSuffix ( "01abc " , "02def " ) , Is . EqualTo ( "" ) ) ;
42
42
}
43
43
44
44
[ Test ]
@@ -65,9 +65,9 @@ public void MatchChineseCharacter()
65
65
{
66
66
// @see https://github.com/qwqcode/SubRenamer/pull/45
67
67
Assert . That ( FindCommonSuffix ( "01話" , "02話" ) , Is . EqualTo ( "話" ) ) ;
68
- Assert . That ( FindCommonSuffix ( "01B 集" , "02B 集" ) , Is . EqualTo ( "集 " ) ) ;
68
+ Assert . That ( FindCommonSuffix ( "01B 集" , "02B 集" ) , Is . EqualTo ( " " ) ) ;
69
69
70
- var result = FindCommonSuffix ( "01B 話 番外篇" , "02B 話 番外篇" ) ;
70
+ var result = FindCommonSuffix ( "01B話 番外篇" , "02B話 番外篇" ) ;
71
71
Assert . That ( result . Length , Is . EqualTo ( 1 ) , "should match only single character" ) ;
72
72
Assert . That ( result , Is . EqualTo ( "話" ) ) ;
73
73
}
0 commit comments