Ejemplo n.º 1
0
	def test_last_status(self):
		pl = Pl()
		segment_info = {'args': Args(last_exit_code=10)}
		self.assertEqual(shell.last_status(pl=pl, segment_info=segment_info),
				[{'contents': '10', 'highlight_group': 'exit_fail'}])
		segment_info['args'].last_exit_code = 0
		self.assertEqual(shell.last_status(pl=pl, segment_info=segment_info), None)
		segment_info['args'].last_exit_code = None
		self.assertEqual(shell.last_status(pl=pl, segment_info=segment_info), None)
Ejemplo n.º 2
0
	def test_last_status(self):
		self.assertEqual(shell.last_status(Args(last_exit_code=10)),
				[{'contents': '10', 'highlight_group': 'exit_fail'}])
		self.assertEqual(shell.last_status(Args(last_exit_code=None)), None)