def test_jagged_alliance(self): os.chdir('tests/files/bat/jagged-alliance') self.assertTrue(toolbox.is_trivial_batch('run.bat')) path, args = toolbox.read_trivial_batch('run.bat') self.assertIsNone(path) self.assertEqual(args, [ '-c', 'MOUNT c Installed', '-c', 'IMGMOUNT d cd.iso -t cdrom', '-c', 'c:', '-c', 'cd jagged', '-c', 'ja.bat', '-c', 'exit' ])
def test_worms(self): os.chdir('tests/files/bat/worms') self.assertTrue(toolbox.is_trivial_batch('runworms.bat')) path, args = toolbox.read_trivial_batch('runworms.bat') self.assertIsNone(path) self.assertEqual(args, [ r'.\drivec\goworms.bat', '-conf', r'.\worms.conf', '-fullscreen', '-exit' ])
def disabled_test_larry7_2(self): os.chdir('tests/files/bat') self.assertTrue(toolbox.is_trivial_batch('larry7/run.bat')) path, args = toolbox.read_trivial_batch('larry7/run.bat') self.assertEqual(path, 'larry7/DOSBOX') self.assertEqual(args, ['-conf', r'..\lsl7.conf', '-c', 'exit'])
def test_stargunner(self): os.chdir('tests/files/bat/stargunner') self.assertFalse(toolbox.is_trivial_batch('Stargunner.bat'))
def test_doom2_2(self): os.chdir('tests/files/bat/doom2') self.assertTrue(toolbox.is_trivial_batch('doom2 + mouse.bat'))
def test_different_extension(self): os.chdir('tests/files/no_conf') self.assertFalse(toolbox.is_trivial_batch('file.exe'))
def test_missing_file(self): os.chdir('tests/files/bat/doom2') self.assertFalse(toolbox.is_trivial_batch('I_do_not_exist.bat'))