diff options
author | Robey Pointer <robey@lag.net> | 2005-12-02 04:03:05 -0800 |
---|---|---|
committer | Robey Pointer <robey@lag.net> | 2005-12-02 04:03:05 -0800 |
commit | ee8a4e4b2b4b9dff1dd43b1a5836400d7822fa2e (patch) | |
tree | 6496d644b14f7debcc11143c7c59f208fe60395f /tests | |
parent | 76eafefcead9e98c7fb488688a7c365e40f58417 (diff) | |
download | paramiko-ee8a4e4b2b4b9dff1dd43b1a5836400d7822fa2e.tar.gz |
[project @ robey@lag.net-20051202120305-73accda404b89d27]
dumb test to verify utf8 encoding
Diffstat (limited to 'tests')
-rwxr-xr-x | tests/test_sftp.py | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/test_sftp.py b/tests/test_sftp.py index 3372e8f8..6a16c248 100755 --- a/tests/test_sftp.py +++ b/tests/test_sftp.py @@ -686,3 +686,19 @@ class SFTPTest (unittest.TestCase): pass finally: sftp.unlink(FOLDER + '/unusual.txt') + + def test_O_utf8(self): + """ + verify that unicode strings are encoded into utf8 correctly. + """ + f = sftp.open(FOLDER + '/something', 'w') + f.write('okay') + f.close() + + try: + sftp.rename(FOLDER + '/something', FOLDER + u'/\u00fcnic\u00f8de') + sftp.open(FOLDER + '/\xc3\xbcnic\xc3\xb8\x64\x65', 'r') + except Exception, e: + self.fail('exception ' + e) + sftp.unlink(FOLDER + '/\xc3\xbcnic\xc3\xb8\x64\x65') + |