self.failUnlessReallyEqual(self.handler._path_from_string("/foo/bar"), [u"foo", u"bar"])
self.failUnlessReallyEqual(self.handler._path_from_string("foo/bar//"), [u"foo", u"bar"])
self.failUnlessReallyEqual(self.handler._path_from_string("/foo/bar//"), [u"foo", u"bar"])
+ self.failUnlessReallyEqual(self.handler._path_from_string("foo/./bar"), [u"foo", u"bar"])
+ self.failUnlessReallyEqual(self.handler._path_from_string("./foo/./bar"), [u"foo", u"bar"])
self.failUnlessReallyEqual(self.handler._path_from_string("foo/../bar"), [u"bar"])
self.failUnlessReallyEqual(self.handler._path_from_string("/foo/../bar"), [u"bar"])
self.failUnlessReallyEqual(self.handler._path_from_string("../bar"), [u"bar"])
self.failUnlessReallyEqual(self.handler.realPath("/foo/bar"), "/foo/bar")
self.failUnlessReallyEqual(self.handler.realPath("foo/bar//"), "/foo/bar")
self.failUnlessReallyEqual(self.handler.realPath("/foo/bar//"), "/foo/bar")
+ self.failUnlessReallyEqual(self.handler.realPath("foo/./bar"), "/foo/bar")
+ self.failUnlessReallyEqual(self.handler.realPath("./foo/./bar"), "/foo/bar")
self.failUnlessReallyEqual(self.handler.realPath("foo/../bar"), "/bar")
self.failUnlessReallyEqual(self.handler.realPath("/foo/../bar"), "/bar")
self.failUnlessReallyEqual(self.handler.realPath("../bar"), "/bar")
d2.addCallback(lambda ign: self.failUnlessEqual(protocol.reason.value.exitCode, 1))
d2.addCallback(lambda ign: session.closed())
return d2
- d.addCallback(_exec_error)
+ d.addCallback(_openShell)
return d
self.shouldFailWithSFTPError(sftp.FX_OP_UNSUPPORTED, "extendedRequest foo bar",
self.handler.extendedRequest, "foo", "bar"))
+ d.addCallback(lambda ign:
+ self.shouldFailWithSFTPError(sftp.FX_BAD_MESSAGE, "extendedRequest posix-rename@openssh.com invalid 1",
+ self.handler.extendedRequest, 'posix-rename@openssh.com', ''))
+ d.addCallback(lambda ign:
+ self.shouldFailWithSFTPError(sftp.FX_BAD_MESSAGE, "extendedRequest posix-rename@openssh.com invalid 2",
+ self.handler.extendedRequest, 'posix-rename@openssh.com', '\x00\x00\x00\x01'))
+ d.addCallback(lambda ign:
+ self.shouldFailWithSFTPError(sftp.FX_BAD_MESSAGE, "extendedRequest posix-rename@openssh.com invalid 3",
+ self.handler.extendedRequest, 'posix-rename@openssh.com', '\x00\x00\x00\x01_\x00\x00\x00\x01'))
+
return d