]> git.rkrishnan.org Git - tahoe-lafs/tahoe-lafs.git/commitdiff
Test the quotemarks=False option of encodingutil.quote_path.
authorDaira Hopwood <daira@jacaranda.org>
Thu, 5 Feb 2015 02:13:23 +0000 (02:13 +0000)
committerDaira Hopwood <daira@jacaranda.org>
Thu, 5 Feb 2015 02:13:23 +0000 (02:13 +0000)
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
src/allmydata/test/test_encodingutil.py

index 926c3659dfd933d52a6ff82c9479c4ff3ff26dfb..4621a196e08e8915e33ca8685f20e49ca939b5d0 100644 (file)
@@ -400,8 +400,10 @@ class QuotePaths(ReallyEqualMixin, unittest.TestCase):
     def test_quote_path(self):
         self.failUnlessReallyEqual(quote_path([u'foo', u'bar']), "'foo/bar'")
         self.failUnlessReallyEqual(quote_path([u'foo', u'bar'], quotemarks=True), "'foo/bar'")
+        self.failUnlessReallyEqual(quote_path([u'foo', u'bar'], quotemarks=False), "foo/bar")
         self.failUnlessReallyEqual(quote_path([u'foo', u'\nbar']), '"foo/\\x0abar"')
         self.failUnlessReallyEqual(quote_path([u'foo', u'\nbar'], quotemarks=True), '"foo/\\x0abar"')
+        self.failUnlessReallyEqual(quote_path([u'foo', u'\nbar'], quotemarks=False), '"foo/\\x0abar"')
 
         self.failUnlessReallyEqual(quote_local_unicode_path(u"\\\\?\\C:\\foo"),
                                    "'C:\\foo'" if sys.platform == "win32" else "'\\\\?\\C:\\foo'")