def test_can_successfully_compile_and_run_test_file_with_config(self):
     fp_language_with_config = FPLanguage(self.config_parser)
     self._compile(fp_language_with_config)
     test_exe = os.path.join(self.test_exe_file_path, self.test_exe_name)
     (ret_code, out, err) = shell(test_exe)
     self.assertEquals(ret_code, 0)
     self.assertEquals(split_lines(out).pop(0), "Hello, world.")
예제 #2
0
 def test_can_successfully_compile_and_run_test_file_with_config(self):
     fp_language_with_config = FPLanguage(self.config_parser)
     self._compile(fp_language_with_config)
     test_exe = os.path.join(self.test_exe_file_path, self.test_exe_name)
     (ret_code, out, err) = shell(test_exe)
     self.assertEquals(ret_code, 0)
     self.assertEquals(split_lines(out).pop(0), "Hello, world.")
예제 #3
0
 def test_can_successfully_call_cl_only(self):
     cpp_language_with_config = CPPLanguage(self.config_parser)
     (ret_code, out, err) = shell(cpp_language_with_config.compiler_path)
     self.assertEquals(ret_code, 0)
예제 #4
0
 def run(self, file, run_string):
     run_cmd = self.get_run_command(file, run_string)
     return shell(run_cmd, work_dir=os.path.dirname(file))
 def test_can_successfully_run_created_exe_file(self):
     self.build_bot.build(self.test_src_file_path, self.test_exe_path)
     (ret_code, out, err) = shell(self.test_exe_path)
     self.assertEquals(ret_code, 0)
     self.assertEquals(split_lines(out).pop(0), "This is a native C++ program.")
예제 #6
0
 def test_can_successfully_call_fpc_only(self):
     fp_language_with_config = FPLanguage(self.config_parser)
     (ret_code, out,
      err) = shell(fp_language_with_config.compiler_path + " -h")
     self.assertEquals(ret_code, 0)
 def test_can_successfully_compile_and_run_test_file_with_config(self):
     cs_language_with_config = CSLanguage(self.config_parser)
     self._compile(cs_language_with_config)
     (ret_code, out, err) = shell(self.test_exe_file_path)
     self.assertEquals(ret_code, 0)
     self.assertEquals(split_lines(out).pop(0), "Hello World using C#!")
 def _compile(self, language):
     compile_cmd = screen_str(
         language.compiler_path) + " /debug+ /out:" + self.test_exe_file_path + " " + self.test_src_file_path
     return shell(compile_cmd)
 def test_can_successfully_call_csc_only(self):
     cs_language_with_config = CSLanguage(self.config_parser)
     (ret_code, out, err) = shell(cs_language_with_config.compiler_path + " -help")
     self.assertEquals(ret_code, 0)
 def test_can_successfully_run_created_exe_file(self):
     self.build_bot.build(self.test_src_file_path, self.test_exe_path)
     test_exe = os.path.join(self.output_dir, self.test_exe_name)
     (ret_code, out, err) = shell(test_exe)
     self.assertEquals(split_lines(out).pop(0), "Hello, world.")
     self.assertEquals(ret_code, 0)
 def test_can_successfully_run_created_exe_file(self):
     self.build_bot.build(self.test_src_file_path, self.test_exe_path)
     (ret_code, out, err) = shell(self.test_exe_path)
     self.assertEquals(ret_code, 0)
     self.assertEquals(
         split_lines(out).pop(0), "This is a native C++ program.")
 def test_can_successfully_call_fpc_only(self):
     fp_language_with_config = FPLanguage(self.config_parser)
     (ret_code, out, err) = shell(fp_language_with_config.compiler_path + " -h")
     self.assertEquals(ret_code, 0)
 def build(self, code_path, exe_path):
     compile_cmd = self.language.get_build_command(code_path, exe_path)
     return shell(compile_cmd)
예제 #14
0
 def test_can_successfully_compile_and_run_test_file_with_config(self):
     cpp_language_with_config = CPPLanguage(self.config_parser)
     self._compile(cpp_language_with_config)
     (ret_code, out, err) = shell(self.test_exe_file_path)
     self.assertEquals(ret_code, 0)
     self.assertEquals(split_lines(out).pop(0), "This is a native C++ program.")
예제 #15
0
 def build(self, code_path, exe_path):
     compile_cmd = self.language.get_build_command(code_path, exe_path)
     return shell(compile_cmd)
예제 #16
0
 def _compile(self, language):
     compile_cmd = screen_str(language.compiler_path) + " " + self.test_src_file_path \
                   + " /Fo" + self.build_dir + os.sep + " /Fe" + self.test_exe_file_path
     return shell(compile_cmd)
 def test_can_successfully_run_created_exe_file(self):
     self.build_bot.build(self.test_src_file_path, self.test_exe_path)
     (ret_code, out, err) = shell(self.test_exe_path)
     self.assertEquals(ret_code, 0)
     self.assertEquals(split_lines(out).pop(0), "Hello World using C#!")
 def test_can_successfully_compile_and_run_test_file_with_config(self):
     cs_language_with_config = CSLanguage(self.config_parser)
     self._compile(cs_language_with_config)
     (ret_code, out, err) = shell(self.test_exe_file_path)
     self.assertEquals(ret_code, 0)
     self.assertEquals(split_lines(out).pop(0), "Hello World using C#!")
 def test_can_successfully_run_created_exe_file(self):
     self.build_bot.build(self.test_src_file_path, self.test_exe_path)
     (ret_code, out, err) = shell(self.test_exe_path)
     self.assertEquals(ret_code, 0)
     self.assertEquals(split_lines(out).pop(0), "Hello World using C#!")
 def test_can_successfully_call_csc_only(self):
     cs_language_with_config = CSLanguage(self.config_parser)
     (ret_code, out,
      err) = shell(cs_language_with_config.compiler_path + " -help")
     self.assertEquals(ret_code, 0)
 def test_can_successfully_run_created_exe_file(self):
     self.build_bot.build(self.test_src_file_path, self.test_exe_path)
     test_exe = os.path.join(self.output_dir, self.test_exe_name)
     (ret_code, out, err) = shell(test_exe)
     self.assertEquals(split_lines(out).pop(0), "Hello, world.")
     self.assertEquals(ret_code, 0)
 def _compile(self, language):
     compile_cmd = screen_str(
         language.compiler_path
     ) + " /debug+ /out:" + self.test_exe_file_path + " " + self.test_src_file_path
     return shell(compile_cmd)
 def run(self, file, run_string):
     run_cmd = self.get_run_command(file, run_string)
     return shell(run_cmd)