Exemple #1
0
 def test_quote_in_arg(self):
     s = r'command "hello \" there"'
     c = bpd.Command(s)
     self.assertEqual(c.args, [u'hello " there'])
Exemple #2
0
 def test_backslash_in_arg(self):
     s = r'command "hello \\ there"'
     c = bpd.Command(s)
     self.assertEqual(c.args, [u'hello \ there'])
Exemple #3
0
 def test_heterogenous_args(self):
     s = r'command "hello there" sir'
     c = bpd.Command(s)
     self.assertEqual(c.name, u'command')
     self.assertEqual(c.args, [u'hello there', u'sir'])
Exemple #4
0
 def test_one_quoted_arg(self):
     s = r'command "hello there"'
     c = bpd.Command(s)
     self.assertEqual(c.name, u'command')
     self.assertEqual(c.args, [u'hello there'])
Exemple #5
0
 def test_two_unquoted_args(self):
     s = r'command hello there'
     c = bpd.Command(s)
     self.assertEqual(c.name, u'command')
     self.assertEqual(c.args, [u'hello', u'there'])
Exemple #6
0
 def test_one_unquoted_arg(self):
     s = r'command hello'
     c = bpd.Command(s)
     self.assertEqual(c.name, u'command')
     self.assertEqual(c.args, [u'hello'])
Exemple #7
0
 def test_no_args(self):
     s = r'command'
     c = bpd.Command(s)
     self.assertEqual(c.name, u'command')
     self.assertEqual(c.args, [])