diff options
author | bescoto <bescoto@2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109> | 2003-11-01 21:04:28 +0000 |
---|---|---|
committer | bescoto <bescoto@2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109> | 2003-11-01 21:04:28 +0000 |
commit | 0b650165a13afc8b518b1ff0c82fa58000732cf5 (patch) | |
tree | da119e2a8a291fc6ae44f80a205c813aa4c4c2b8 /rdiff-backup/testing | |
parent | c8884879f2c125a394696ef0619b090539f9d072 (diff) | |
download | rdiff-backup-0b650165a13afc8b518b1ff0c82fa58000732cf5.tar.gz |
Quoted RPaths are now transmitted correctly (no conversion to RPaths)
git-svn-id: http://svn.savannah.nongnu.org/svn/rdiff-backup/trunk@484 2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109
Diffstat (limited to 'rdiff-backup/testing')
-rw-r--r-- | rdiff-backup/testing/connectiontest.py | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/rdiff-backup/testing/connectiontest.py b/rdiff-backup/testing/connectiontest.py index 265862a..9b1d202 100644 --- a/rdiff-backup/testing/connectiontest.py +++ b/rdiff-backup/testing/connectiontest.py @@ -1,7 +1,7 @@ import unittest, types, tempfile, os, sys from commontest import * from rdiff_backup.connection import * -from rdiff_backup import Globals, rpath +from rdiff_backup import Globals, rpath, FilenameMapping class LocalConnectionTest(unittest.TestCase): """Test the dummy connection""" @@ -144,6 +144,15 @@ class PipeConnectionTest(unittest.TestCase): assert self.conn.reval("lambda rp: rp.data", rp) == rp.data assert self.conn.reval("lambda rp: rp.conn is Globals.local_connection", rp) + def testQuotedRPaths(self): + """Test transmission of quoted rpaths""" + qrp = FilenameMapping.QuotedRPath(self.conn, + "testfiles/various_file_types/regular_file") + assert self.conn.reval("lambda qrp: qrp.data", qrp) == qrp.data + assert qrp.isreg(), qrp + qrp_class_str = self.conn.reval("lambda qrp: str(qrp.__class__)", qrp) + assert qrp_class_str.find("QuotedRPath") > -1, qrp_class_str + def testExceptions(self): """Test exceptional results""" self.assertRaises(os.error, self.conn.os.lstat, |