Skip to content

Commit

Permalink
fix bug on redo test not working
Browse files Browse the repository at this point in the history
  • Loading branch information
ostinelli committed Oct 13, 2012
1 parent 888469b commit 20d9671
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions sublimerl_tests_integration.py
Expand Up @@ -265,6 +265,7 @@ def compile_eunit_run_suite(self, suite, function_name=None):
if function_name != None:
os_cmd += ' tests=%s' % function_name
if self.app_name: os_cmd += ' apps=%s' % self.app_name

retcode, data = self.execute_os_command(os_cmd, dir_type='project', block=False)
# interpret
self.interpret_test_results(retcode, data)
Expand Down Expand Up @@ -396,7 +397,7 @@ def dialyzer_test(self, view):
if test_runner.initialized == False: return
test_runner.start_test()

def ct_or_eunit_test(self, view):
def ct_or_eunit_test(self, view, new=True):
if SUBLIMERL.get_erlang_module_name(view).find("_SUITE") != -1:
# ct
test_runner = SublimErlCtTestRunner(view)
Expand All @@ -405,7 +406,7 @@ def ct_or_eunit_test(self, view):
test_runner = SublimErlEunitTestRunner(view)

if test_runner.initialized == False: return
test_runner.start_test()
test_runner.start_test(new=new)


# dialyzer tests
Expand All @@ -424,8 +425,8 @@ def run_command(self, edit):
class SublimErlRedoCommand(SublimErlTextCommand):
def run_command(self, edit):
# init
if SUBLIMERL.last_test_type == 'dialyzer': SublimErlTestRunners().dialyzer_test(self.view)
elif SUBLIMERL.last_test_type == 'eunit' or SUBLIMERL.last_test_type == 'ct': SublimErlTestRunners().ct_or_eunit_test(self.view)
if SUBLIMERL.last_test_type == 'dialyzer': SublimErlTestRunners().dialyzer_test(self.view, new=False)
elif SUBLIMERL.last_test_type == 'eunit' or SUBLIMERL.last_test_type == 'ct': SublimErlTestRunners().ct_or_eunit_test(self.view, new=False)

def show_contextual_menu(self):
return SUBLIMERL.last_test != None
Expand Down

0 comments on commit 20d9671

Please sign in to comment.