def test_line_split():
 sp = completer.CompletionSplitter()
 t = [('run some/scrip', '', 'some/scrip'), ('run scripts/er', 'ror.py foo', 'scripts/er'), ('echo $HOM', '', 'HOM'), ('print sys.pa', '', 'sys.pa'), ('print(sys.pa', '', 'sys.pa'), ("execfile('scripts/er", '', 'scripts/er'), ('a[x.', '', 'x.'), ('a[x.', 'y', 'x.'), ('cd "some_file/', '', 'some_file/')]
 check_line_split(sp, t)
 check_line_split(sp, [map(str, p) for p in t])

def test_line_split ( ) : sp = completer . CompletionSplitter ( ) t = [ ( 'run some/scrip' , '' , 'some/scrip' ) , ( 'run scripts/er' , 'ror.py foo' , 'scripts/er' ) , ( 'echo $HOM' , '' , 'HOM' ) , ( 'print sys.pa' , '' , 'sys.pa' ) , ( 'print(sys.pa' , '' , 'sys.pa' ) , ( "execfile('scripts/er" , '' , 'scripts/er' ) , ( 'a[x.' , '' , 'x.' ) , ( 'a[x.' , 'y' , 'x.' ) , ( 'cd "some_file/' , '' , 'some_file/' ) ] check_line_split ( sp , t ) check_line_split ( sp , [ map ( str , p ) for p in t ] )
basic line splitter test with default specs .