summary refs log tree commit diff stats
path: root/doc
Commit message (Expand)AuthorAgeFilesLines
* doc/cd-after-exit: updatedhut2010-02-141-21/+15
* doc/pick.sh: corrected commit orderhut2010-02-091-1/+1
* doc: what breaks cd-after-exit support in zshhut2010-02-091-0/+2
* pick.sh: added -m to checkout commadshut2010-02-051-3/+3
* pick.sh: added variables for easier customizationhut2010-02-041-7/+8
* added doc/pick.shhut2010-02-041-0/+24
* updated dochut2010-01-211-4/+20
* 1.0.2! v1.0.2hut2010-01-1430-84/+116
* updated pydoc documentationhut2010-01-1361-846/+795
* todo: added more info on bug #31hut2010-01-091-0/+5
* random cleanups and fixeshut2010-01-071-5/+6
* new minor version v1.0.1hut2010-01-022-4/+4
* updated pydoc documentationhut2010-01-0248-788/+3167
* notify: merged into statusbar, allow to view the log in the pagerhut2010-01-013-35/+2
* cleanupshut2009-12-311-1/+5
* rename filelist(container) to browsercolumn/browserviewhut2009-12-313-38/+76
* updated uml projecthut2009-12-305-73/+215
* shorten comment in ranger.pyhut2009-12-261-0/+4
* moved /uml to /doc/umlhut2009-12-2514-0/+2180
* Explained cd-after-exit featurehut2009-12-251-0/+132
* moved pydoc pages to doc/pydochut2009-12-2565-0/+0
* updated pydoc pageshut2009-12-2565-0/+10505
/span> unittest import TestCase, main from ranger.ext.utfwidth import * a_ascii = "a" # width = 1, bytes = 1 a_umlaut = "ä" # width = 1, bytes = 2 a_katakana = "ア" # width = 2, bytes = 3 # need one with width = 1 & bytes = 3 class Test(TestCase): def test_utf_byte_length(self): self.assertEqual(1, utf_byte_length(a_ascii)) self.assertEqual(2, utf_byte_length(a_umlaut)) self.assertEqual(3, utf_byte_length(a_katakana)) def test_uwid(self): self.assertEqual(1, uwid(a_ascii)) self.assertEqual(1, uwid(a_umlaut)) self.assertEqual(2, uwid(a_katakana)) self.assertEqual(3, uwid(a_katakana + a_umlaut)) self.assertEqual(4, uwid("asdf")) self.assertEqual(5, uwid("löööl")) self.assertEqual(6, uwid("バババ")) if __name__ == '__main__': main()