Exemple #1
0
def test_parse_quoted_string_start():
    """
    Test parsing of a "complicated" run command.
    """
    input = 'run -d ubuntu:14.04 /bin/sh -c "w'
    first = DockerCompleter.first_token(input)
    assert first == 'run'
Exemple #2
0
def test_parse_quoted_string_start():
    """
    Test parsing of a "complicated" run command.
    """
    input = 'run -d ubuntu:14.04 /bin/sh -c "w'
    first = DockerCompleter.first_token(input)
    assert first == 'run'
Exemple #3
0
def test_parse_quoted_string():
    """
    Test parsing of a "complicated" run command.
    """
    input = ('run -d ubuntu:14.04 /bin/sh -c '
             '"while true; do echo hello world; sleep 1; done"')
    first = DockerCompleter.first_token(input)
    assert first == 'run'
Exemple #4
0
def test_parse_quoted_string():
    """
    Test parsing of a "complicated" run command.
    """
    input = ('run -d ubuntu:14.04 /bin/sh -c '
             '"while true; do echo hello world; sleep 1; done"')
    first = DockerCompleter.first_token(input)
    assert first == 'run'