Пример #1
0
 def test_respect_no_negative_close(self):
     self.assertEqual(
         AppBase.separate_args('abc)))(((,))),def'),
         ['abc)))(((,)))', 'def'])
Пример #2
0
 def test_respect_brackets_parens(self):
     # TODO: crazy bracket/parens combinations, we should warn here..
     self.assertEqual(
         AppBase.separate_args('abc,def[g(h]i(,j],k)),l],m([),]n)o'),
         ['abc', 'def[g(h]i(,j],k))', 'l]', 'm([),]n)o'])
Пример #3
0
 def test_respect_brackets(self):
     self.assertEqual(
         AppBase.separate_args('abc,def[g[h[i],j],kl],mno'),
         ['abc', 'def[g[h[i],j],kl]', 'mno'])
Пример #4
0
 def test_respect_parens(self):
     self.assertEqual(
         AppBase.separate_args('abc,def(g(h(i),j),kl),mno'),
         ['abc', 'def(g(h(i),j),kl)', 'mno'])
Пример #5
0
 def test_respect_backslashes(self):
     self.assertEqual(
         AppBase.separate_args('"abc\\",\\"def"'),
         ['abc","def'])
Пример #6
0
 def test_respect_backslashes_raw(self):
     self.assertEqual(
         AppBase.separate_args(
             '"abc\\",\\"def"', remove_quotes_backslashes=False),
         ['"abc\\",\\"def"'])
Пример #7
0
 def test_respect_quotes(self):
     self.assertEqual(
         AppBase.separate_args('"a,b,c","d",e,f'),
         ['a,b,c', 'd', 'e', 'f'])
Пример #8
0
 def test_respect_quotes_raw(self):
     self.assertEqual(
         AppBase.separate_args(
             '"a,b,c","d",e,f', remove_quotes_backslashes=False),
         ['"a,b,c"', '"d"', 'e', 'f'])
Пример #9
0
 def test_other_delimiter(self):
     self.assertEqual(
         AppBase.separate_args('a,b,c|"d,e,f"|"ghi"', '|'),
         ['a,b,c', 'd,e,f', 'ghi'])
Пример #10
0
 def test_quoted_abc_def_ghi(self):
     self.assertEqual(
         AppBase.separate_args('abc,"def","ghi"'),
         ['abc', 'def', 'ghi'])
Пример #11
0
 def test_quoted_abc_def(self):
     self.assertEqual(
         AppBase.separate_args('"abc",def'),
         ['abc', 'def'])
Пример #12
0
 def test_quoted_abc(self):
     self.assertEqual(
         AppBase.separate_args('"abc"'),
         ['abc'])
Пример #13
0
 def test_abc_def_ghi(self):
     self.assertEqual(
         AppBase.separate_args('abc,def,ghi'),
         ['abc', 'def', 'ghi'])