def test_testName(self): color.blue("test here baby") fileName="/Users/maks/Library/Application Support/Sublime Text 3/Packages/navigateTo/test/fileNameAndPositionTo_goRunTestCommand/poligon.go" pos = 285 result = navigateToModel.fileNameAndPositionTo_goRunTestCommand(fileName, pos) expected = "go test -test.run Test_toJson" assertMy.equals(result, expected)
def test_testName(self): color.blue("test here baby") filename = os.path.join(currentFolder, 'poligon/example.go') position = 43 result = navigateToModel.fileNameAndPositionTo_goRunTestCommand(filename, position) expectedPath = os.path.join(currentFolder, 'poligon') expected = """cd "{0}"; TALK=1 go test -test.run Test_FromJson0""".format(expectedPath) assertMy.equals(result, expected)
def run(self): view = self.window.active_view() filename = view.file_name() view = self.window.active_view() region1 = view.sel()[0] position = region1.a command = navigateToModel.fileNameAndPositionTo_goRunTestCommand(filename, position) sublime.set_clipboard(command) sublime.status_message("in clipboard: "+command)