             XCTAssertEqual(files.count, 0)
             dir.close()
             
+            // test symlink
+            dir = try SSHKitSFTPFile.openDirectory(channel, path: lnFolderPathForTest)
+            files = dir.listDirectory(nil)
+            XCTAssertEqual(files.count, 4)
+            dir.close()
+            
         } catch let error as NSError {
             XCTFail(error.description)
+        }
+        do {
+            // try to ls symlink file
+            let dir = try SSHKitSFTPFile.openDirectory(channel, path: lnFilePathForTest)
+            let files = dir.listDirectory(nil)
+            XCTAssertEqual(files.count, 4)
+            dir.close()
+        } catch let error as NSError {
+            if error.code != SSHKitSFTPErrorCode.NoSuchFile.rawValue {
+                XCTFail(error.description)
+            }
         }
     }
     

        // Put teardown code here. This method is called after the invocation of each test method in the class.
        unlink(lsFolderPathForTest.stringByAppendingString("/1"))
        unlink(lsFolderPathForTest.stringByAppendingString("/2"))
        rmdir(lsFolderPathForTest)
        
        unlink(filePathForWriteTest)

    private var readFileExpectation: XCTestExpectation?

    let lsFolderPathForTest = "./ls"
    let lnFolderPathForTest = "./ln"
    let lnFilePathForTest = "./lnFile"
    let filePathForWriteTest = "./test_write.txt"
    let filePathForReadTest = "./test_read.txt"

