Explorar el Código

Added a unicode test for OverlapLength()

Strahinja Val Markovic hace 10 años
padre
commit
57b1ae129c
Se han modificado 1 ficheros con 6 adiciones y 0 borrados
  1. 6 0
      python/ycm/tests/base_test.py

+ 6 - 0
python/ycm/tests/base_test.py

@@ -1,4 +1,5 @@
 #!/usr/bin/env python
+# -*- coding: utf-8 -*-
 #
 # Copyright (C) 2013  Google Inc.
 #
@@ -105,6 +106,11 @@ def OverlapLength_Basic_test():
   eq_( 3, base.OverlapLength( 'foobar', 'barzoo' ) )
 
 
+def OverlapLength_BasicWithUnicode_test():
+  eq_( 3, base.OverlapLength( u'bar fäö', u'fäö bar' ) )
+  eq_( 3, base.OverlapLength( u'zoofäö', u'fäözoo' ) )
+
+
 def OverlapLength_OneCharOverlap_test():
   eq_( 1, base.OverlapLength( 'foo b', 'b zoo' ) )