Пример #1
0
 def test_no_split_escaped_more_spaces(self):
     self.assertEqual(split('foo " bar \\"quux \\" baz" peng'),
                           ('foo', '" bar \\"quux \\" baz"', 'peng',))
Пример #2
0
 def test_no_split_escaped_more_escapes(self):
     self.assertEqual(split('foo bar\\ baz fred\\ barney\\ wilma\\ \\ betty'),
                           ('foo', 'bar\\ baz', 'fred\\ barney\\ wilma\\ \\ betty'))
Пример #3
0
 def test_more_spaces(self):
     self.assertEqual(split('"foo bar baz peng"'), ('"foo bar baz peng"',))
Пример #4
0
 def test_endswith_space(self):
     self.assertEqual(split('foo '), ('foo',))
Пример #5
0
 def test_no_split_escaped(self):
     self.assertEqual(split('foo\\ bar'), ('foo\\ bar',))
Пример #6
0
 def test_no_split_escaped_more_escapes(self):
     self.assertEqual(split("'foo '   'bar '' quux' baz ' peng'''"),
                           ("'foo '", "'bar '", "' quux'", 'baz', "' peng'", "''"))
Пример #7
0
 def test_simple(self):
     self.assertEqual(split('foo bar'), ('foo', 'bar'))
Пример #8
0
 def test_endswith_space(self):
     self.assertEqual(split("'foo '"), ("'foo '",))
Пример #9
0
 def test_double_space(self):
     self.assertEqual(split("'foo  bar'"), ("'foo  bar'",))
Пример #10
0
 def test_simple(self):
     self.assertEqual(split("'foo bar'"), ("'foo bar'",))
Пример #11
0
 def test_more_spaces(self):
     self.assertEqual(split("'foo bar baz peng'"), ("'foo bar baz peng'",))
Пример #12
0
 def test_no_split_escaped_more_escapes(self):
     self.assertEqual(split('"foo "   "bar "" quux" baz " peng"""'),
                           ('"foo "', '"bar "', '" quux"', 'baz', '" peng"', '""'))
Пример #13
0
 def test_unquoted_spaces(self):
     self.assertEqual(split('\\"foo \\" bar " quux "'),
                           ('\\"foo', '\\"', 'bar', '" quux "',))
Пример #14
0
 def test_startswith_escaped(self):
     self.assertEqual(split('\\"foo bar "quux " baz peng'),
                           ('\\"foo', 'bar', '"quux "', 'baz', 'peng',))
Пример #15
0
 def test_startswith_escaped(self):
     self.assertEqual(split("\\'foo bar 'quux ' baz peng"),
                           ("\\'foo", "bar", "'quux '", "baz", "peng",))
Пример #16
0
 def test_substring(self):
     self.assertEqual(split("foo bar 'baz peng'"), ("foo", "bar", "'baz peng'",))
Пример #17
0
 def test_unquoted_spaces(self):
     self.assertEqual(split("\\'foo \\' bar ' quux '"),
                           ("\\'foo", "\\'", "bar", "' quux '",))
Пример #18
0
 def test_substring_triple_space(self):
     self.assertEqual(split("foo   'bar baz' peng"), ("foo", "'bar baz'", "peng",))
Пример #19
0
 def test_evil_quoting(self):
     self.assertEqual(split("'foo bar'\\''baz ' peng"),
                           ("'foo bar'\\''baz '", 'peng'))
Пример #20
0
 def test_no_split_double_quote(self):
     self.assertEqual(split("foo 'bar \"baz' peng"), ("foo", "'bar \"baz'", "peng",))
Пример #21
0
 def test_more_spaces(self):
     self.assertEqual(split('foo bar baz peng'), ('foo', 'bar', 'baz', 'peng'))
Пример #22
0
 def test_startswith_escaped_double_quote(self):
     self.assertEqual(split("\\\"'foo bar 'quux ' baz peng"),
                           ('\\"', "'foo bar '", 'quux', "' baz peng"))
Пример #23
0
 def test_triple_space(self):
     self.assertEqual(split('foo   bar'), ('foo', 'bar'))
Пример #24
0
 def test_endswith_escaped_double_quote(self):
     self.assertEqual(split("'foo bar 'quux ' baz peng\\\""),
                           ("'foo bar '", 'quux', '\' baz peng\\"'))
Пример #25
0
 def test_no_split_escaped_more_spaces(self):
     self.assertEqual(split('foo bar\\ baz peng'), ('foo', 'bar\\ baz', 'peng'))
Пример #26
0
 def test_no_split_escaped(self):
     self.assertEqual(split("foo 'bar \\'quux\\' baz' peng"),
                           ('foo', "'bar \\'", "quux\\'", 'baz', "' peng"))
Пример #27
0
 def test_simple(self):
     self.assertEqual(split('"foo bar"'), ('"foo bar"',))
Пример #28
0
 def test_no_split_escaped_more_spaces(self):
     self.assertEqual(split("foo ' bar \\'quux \\' baz' peng"),
                           ('foo', "' bar \\'", 'quux', "\\'", 'baz', "' peng"))
Пример #29
0
 def test_startswith_space(self):
     self.assertEqual(split('" foo"'), ('" foo"',))
Пример #30
0
 def test_endswith_escaped_single_quote(self):
     self.assertEqual(split('"foo bar "quux " baz peng\\\''),
                           ('"foo bar "', 'quux', '" baz peng\\\'',))