Skip to content
This repository

Add Run Tests and Show Output command and keybinding #53

Merged
merged 2 commits into from over 1 year ago

2 participants

Peter Zotov Andrew De Ponte
Peter Zotov

See also issue #44.

Andrew De Ponte cyphactor referenced this pull request from a commit July 25, 2012
Andrew De Ponte Cleaned up issue #52 and issue #53 pulls.
I also fixed a number of other small issues that I noticed while going
through the code base. Primarily fixing keymappings for Linux and
Windows.
a41a1b9
Andrew De Ponte cyphactor merged commit 54abb3e into from July 25, 2012
Andrew De Ponte cyphactor closed this July 25, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
This page is out of date. Refresh to see the latest.
5  Default (Linux).sublime-keymap
... ...
@@ -1,5 +1,4 @@
1 1
 [
2  
-	{
3  
-		"keys": ["super+shit+s"], "command": "gotospec"
4  
-	}
  2
+	{ "keys": ["super+shfit+s"], "command": "gotospec" },
  3
+	{ "keys": ["ctrl+shift+g"], "command": "run_tests_and_show_output_guard" }
5 4
 ]
15  guard.py
@@ -106,7 +106,7 @@ def append_data(self, data):
106 106
         # actually append the data
107 107
         self.output_view.set_read_only(False)
108 108
         edit = self.output_view.begin_edit()
109  
-        
  109
+
110 110
         # clear the output window when a predefined text is found.
111 111
         if (self.clear_when_find_this_text and self.clear_when_find_this_text.search(clean_data)):
112 112
             self.output_view.erase(edit, sublime.Region(0, self.output_view.size()))
@@ -154,6 +154,10 @@ def run_all_tests(self):
154 154
         self.proc.stdin.write('\n')
155 155
         self.proc.stdin.flush()
156 156
 
  157
+    def run_tests_and_show_output(self):
  158
+        self.listener.window.run_command('show_panel', {'panel': 'output.guard'})
  159
+        self.run_all_tests()
  160
+
157 161
     def output_help(self):
158 162
         self.proc.stdin.write('h\n')
159 163
         self.proc.stdin.flush()
@@ -237,6 +241,15 @@ def is_enabled(self):
237 241
         return GuardControllerSingleton().is_guard_running()
238 242
 
239 243
 
  244
+class RunTestsAndShowOutputGuardCommand(sublime_plugin.WindowCommand):
  245
+
  246
+    def run(self):
  247
+        GuardControllerSingleton().set_listener(self).run_tests_and_show_output()
  248
+
  249
+    def is_enabled(self):
  250
+        return GuardControllerSingleton().is_guard_running()
  251
+
  252
+
240 253
 class OutputHelpGuardCommand(sublime_plugin.WindowCommand):
241 254
 
242 255
     def run(self):
Commit_comment_tip

Tip: You can add notes to lines in a file. Hover to the left of a line to make a note

Something went wrong with that request. Please try again.