From 57b1ae129c6d23ec0dacbcab97dd0cf71fc4c786 Mon Sep 17 00:00:00 2001 From: Strahinja Val Markovic Date: Wed, 27 Aug 2014 15:01:16 -0700 Subject: [PATCH] Added a unicode test for OverlapLength() --- python/ycm/tests/base_test.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/python/ycm/tests/base_test.py b/python/ycm/tests/base_test.py index 67ab413f..84724c44 100644 --- a/python/ycm/tests/base_test.py +++ b/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' ) )