예제 #1
0
 def test_get_command_output_returns_sequence_of_lines(self):
     self.assertEqual(["1", "2"],
                      address.get_command_output("echo", "1\n2"))
예제 #2
0
 def test_get_command_output_uses_C_locale(self):
     locale = parse_locale_lines(address.get_command_output("locale"))
     self.assertEqual("C.UTF-8", locale["LC_CTYPE"])
     self.assertEqual("C.UTF-8", locale["LC_MESSAGES"])
     self.assertEqual("C.UTF-8", locale["LANG"])
예제 #3
0
 def test_get_command_output_executes_command(self):
     self.assertEqual(["Hello"],
                      address.get_command_output("echo", "Hello"))
예제 #4
0
 def test_get_command_output_does_not_expand_arguments(self):
     self.assertEqual(["$*"], address.get_command_output("echo", "$*"))
예제 #5
0
 def test_get_command_output_returns_sequence_of_lines(self):
     self.assertEqual(['1', '2'],
                      address.get_command_output('echo', '1\n2'))
예제 #6
0
 def test_get_command_output_uses_C_locale(self):
     locale = parse_locale_lines(address.get_command_output('locale'))
     self.assertEqual('C.UTF-8', locale['LC_CTYPE'])
     self.assertEqual('C.UTF-8', locale['LC_MESSAGES'])
     self.assertEqual('C.UTF-8', locale['LANG'])
예제 #7
0
 def test_get_command_output_executes_command(self):
     self.assertEqual(["Hello"],
                      address.get_command_output('echo', 'Hello'))
예제 #8
0
 def test_get_command_output_uses_C_locale(self):
     locale = parse_locale_lines(address.get_command_output('locale'))
     self.assertEqual('C', locale['LC_CTYPE'])
     self.assertEqual('C', locale['LC_MESSAGES'])
     self.assertEqual('en_US.UTF-8', locale['LANG'])
예제 #9
0
 def test_get_command_output_returns_sequence_of_lines(self):
     self.assertEqual(
         ['1', '2'], address.get_command_output('echo', '1\n2'))
예제 #10
0
 def test_get_command_output_does_not_expand_arguments(self):
     self.assertEqual(["$*"], address.get_command_output('echo', '$*'))
예제 #11
0
 def test_get_command_output_executes_command(self):
     self.assertEqual(
         ["Hello"], address.get_command_output('echo', 'Hello'))