Ejemplo n.º 1
0
 def testCanSetProject(self):
     try:
         cmd, args = self.cmd_line
         s = Server(cmd, *args)
         s.start()
         p = os.path.join(DATA_DIR, "FindDecl.fsproj")
         self.assertTrue(os.path.exists(p))
         s.project(p)
         response = s.read_line()
         self.assertEqual(response["Kind"], "project")
     finally:
         s.stop()
Ejemplo n.º 2
0
 def testCanSetProject(self):
     try:
         cmd, args = self.cmd_line
         s = Server(cmd, *args)
         s.start()
         p = os.path.join(DATA_DIR, 'FindDecl.fsproj')
         self.assertTrue(os.path.exists(p))
         s.project(p)
         response = s.read_line()
         self.assertEqual(response['Kind'], 'project')
     finally:
         s.stop()
Ejemplo n.º 3
0
 def testCanFindDeclaration(self):
     try:
         cmd, args = self.cmd_line
         s = Server(cmd, *args)
         s.start()
         p = os.path.join(DATA_DIR, "FileTwo.fs")
         p2 = os.path.join(DATA_DIR, "Script.fsx")
         p3 = os.path.join(DATA_DIR, "Program.fs")
         s.project(p)
         _ = s.read_line()
         s.parse(p)
         _ = s.read_line()
         s.parse(p2)
         _ = s.read_line()
         s.parse(p3)
         _ = s.read_line()
         s.find_declaration(p3, 5, 15)
         response = s.read_line()
         self.assertEqual(response["Kind"], "finddecl")
     finally:
         s.stop()
Ejemplo n.º 4
0
 def testCanFindDeclaration(self):
     try:
         cmd, args = self.cmd_line
         s = Server(cmd, *args)
         s.start()
         p = os.path.join(DATA_DIR, 'FileTwo.fs')
         p2 = os.path.join(DATA_DIR, 'Script.fsx')
         p3 = os.path.join(DATA_DIR, 'Program.fs')
         s.project(p)
         _ = s.read_line()
         s.parse(p)
         _ = s.read_line()
         s.parse(p2)
         _ = s.read_line()
         s.parse(p3)
         _ = s.read_line()
         s.find_declaration(p3, 5, 15)
         response = s.read_line()
         self.assertEqual(response['Kind'], 'finddecl')
     finally:
         s.stop()