store: add multiline doctest case for encodedir()
authorAdrian Buehlmann <adrian@cadifra.com>
Tue, 18 Sep 2012 07:58:50 +0200
changeset 17605 e9cc29be3305
parent 17604 bf9894889d82
child 17606 318fb32b980e
store: add multiline doctest case for encodedir() a followup to 64c6a0d4d4bd
mercurial/store.py
--- a/mercurial/store.py	Mon Sep 17 11:00:38 2012 +0200
+++ b/mercurial/store.py	Tue Sep 18 07:58:50 2012 +0200
@@ -21,6 +21,8 @@
     'data/foo.i.hg/bla.i'
     >>> encodedir('data/foo.i.hg/bla.i')
     'data/foo.i.hg.hg/bla.i'
+    >>> encodedir('data/foo.i\\ndata/foo.i/bla.i\\ndata/foo.i.hg/bla.i\\n')
+    'data/foo.i\\ndata/foo.i.hg/bla.i\\ndata/foo.i.hg.hg/bla.i\\n'
     '''
     return (path
             .replace(".hg/", ".hg.hg/")