|
@@ -211,6 +211,22 @@ def LastEnteredCharIsIdentifierChar_NotIdentChar_test():
|
|
|
ok_( not base.LastEnteredCharIsIdentifierChar() )
|
|
|
|
|
|
|
|
|
+def LastEnteredCharIsIdentifierChar_Unicode_test():
|
|
|
+ with MockCurrentFiletypes():
|
|
|
+ # CurrentColumn returns a byte offset and character ø is 2 bytes length.
|
|
|
+ with MockCurrentColumnAndLineContents( 5, 'føo(' ):
|
|
|
+ ok_( not base.LastEnteredCharIsIdentifierChar() )
|
|
|
+
|
|
|
+ with MockCurrentColumnAndLineContents( 4, 'føo(' ):
|
|
|
+ ok_( base.LastEnteredCharIsIdentifierChar() )
|
|
|
+
|
|
|
+ with MockCurrentColumnAndLineContents( 3, 'føo(' ):
|
|
|
+ ok_( base.LastEnteredCharIsIdentifierChar() )
|
|
|
+
|
|
|
+ with MockCurrentColumnAndLineContents( 1, 'føo(' ):
|
|
|
+ ok_( base.LastEnteredCharIsIdentifierChar() )
|
|
|
+
|
|
|
+
|
|
|
def CurrentIdentifierFinished_Basic_test():
|
|
|
with MockCurrentFiletypes():
|
|
|
with MockCurrentColumnAndLineContents( 3, 'ab;' ):
|
|
@@ -234,11 +250,14 @@ def CurrentIdentifierFinished_NothingBeforeColumn_test():
|
|
|
def CurrentIdentifierFinished_InvalidColumn_test():
|
|
|
with MockCurrentFiletypes():
|
|
|
with MockCurrentColumnAndLineContents( 5, '' ):
|
|
|
- ok_( not base.CurrentIdentifierFinished() )
|
|
|
+ ok_( base.CurrentIdentifierFinished() )
|
|
|
|
|
|
with MockCurrentColumnAndLineContents( 5, 'abc' ):
|
|
|
ok_( not base.CurrentIdentifierFinished() )
|
|
|
|
|
|
+ with MockCurrentColumnAndLineContents( 4, 'ab;' ):
|
|
|
+ ok_( base.CurrentIdentifierFinished() )
|
|
|
+
|
|
|
|
|
|
def CurrentIdentifierFinished_InMiddleOfLine_test():
|
|
|
with MockCurrentFiletypes():
|
|
@@ -268,3 +287,19 @@ def CurrentIdentifierFinished_WhitespaceOnly_test():
|
|
|
|
|
|
with MockCurrentColumnAndLineContents( 3, '\t\t\t\t' ):
|
|
|
ok_( base.CurrentIdentifierFinished() )
|
|
|
+
|
|
|
+
|
|
|
+def CurrentIdentifierFinished_Unicode_test():
|
|
|
+ with MockCurrentFiletypes():
|
|
|
+ # CurrentColumn returns a byte offset and character ø is 2 bytes length.
|
|
|
+ with MockCurrentColumnAndLineContents( 6, 'føo ' ):
|
|
|
+ ok_( base.CurrentIdentifierFinished() )
|
|
|
+
|
|
|
+ with MockCurrentColumnAndLineContents( 5, 'føo ' ):
|
|
|
+ ok_( base.CurrentIdentifierFinished() )
|
|
|
+
|
|
|
+ with MockCurrentColumnAndLineContents( 4, 'føo ' ):
|
|
|
+ ok_( not base.CurrentIdentifierFinished() )
|
|
|
+
|
|
|
+ with MockCurrentColumnAndLineContents( 3, 'føo ' ):
|
|
|
+ ok_( not base.CurrentIdentifierFinished() )
|