Beispiel #1
0
def test_show_argv_tab():
    assert show_argv("foo\tbar") == r"$'foo\tbar'"
Beispiel #2
0
def test_show_argv_hash():
    assert show_argv("foo#bar") == "'foo#bar'"
Beispiel #3
0
def test_show_argv_apostrophe():
    assert show_argv("foo'bar") == "'foo'\"'\"'bar'"
Beispiel #4
0
def test_show_argv_verticaltab():
    assert show_argv("foo\vbar") == r"$'foo\vbar'"
Beispiel #5
0
def test_show_argv_space():
    assert show_argv('foo bar') == "'foo bar'"
Beispiel #6
0
def test_show_argv_8bits():
    assert show_argv('foo\xFFbar') == r"$'foo\xffbar'"
Beispiel #7
0
def test_show_argv_bell():
    assert show_argv("foo\abar") == r"$'foo\abar'"
Beispiel #8
0
def test_show_argv_escape():
    assert show_argv("foo\x1Bbar") == r"$'foo\ebar'"
Beispiel #9
0
def test_show_argv_space():
    assert show_argv('foo bar') == "'foo bar'"
Beispiel #10
0
def test_show_argv_formfeed():
    assert show_argv("foo\fbar") == r"$'foo\fbar'"
Beispiel #11
0
def test_show_argv_return():
    assert show_argv("foo\rbar") == r"$'foo\rbar'"
Beispiel #12
0
def test_show_argv_verticaltab():
    assert show_argv("foo\vbar") == r"$'foo\vbar'"
Beispiel #13
0
def test_show_argv_nothing():
    assert show_argv() == ''
Beispiel #14
0
def test_show_argv_linefeed():
    assert show_argv("foo\nbar") == r"$'foo\nbar'"
Beispiel #15
0
def test_show_argv_tilde():
    assert show_argv("foo~bar") == "'foo~bar'"
Beispiel #16
0
def test_show_argv_exclamation():
    assert show_argv("foo!bar") == "'foo!bar'"
Beispiel #17
0
def test_show_argv_null():
    assert show_argv("foo\0bar") == r"$'foo\x00bar'"
Beispiel #18
0
def test_show_argv_quote():
    assert show_argv("foo\"bar") == "'foo\"bar'"
Beispiel #19
0
def test_show_argv_surrogateesc():
    assert show_argv('foo\udc80bar') == r"$'foo\x80bar'"
Beispiel #20
0
def test_show_argv_hash():
    assert show_argv("foo#bar") == "'foo#bar'"
Beispiel #21
0
def test_show_argv_tab():
    assert show_argv("foo\tbar") == r"$'foo\tbar'"
Beispiel #22
0
def test_show_argv_dollar():
    assert show_argv("foo$bar") == "'foo$bar'"
Beispiel #23
0
def test_show_argv_return():
    assert show_argv("foo\rbar") == r"$'foo\rbar'"
Beispiel #24
0
def test_show_argv_percent():
    assert show_argv("foo%bar") == "foo%bar"
Beispiel #25
0
def test_show_argv_exclamation():
    assert show_argv("foo!bar") == "'foo!bar'"
Beispiel #26
0
def test_show_argv_empty():
    assert show_argv('') == "''"
Beispiel #27
0
def test_show_argv_percent():
    assert show_argv("foo%bar") == "foo%bar"
Beispiel #28
0
def test_show_argv_ampersand():
    assert show_argv("foo&bar") == "'foo&bar'"
Beispiel #29
0
def test_show_argv_rightparen():
    assert show_argv("foo)bar") == "'foo)bar'"
Beispiel #30
0
def test_show_argv_apostrophe():
    assert show_argv("foo'bar") == "'foo'\"'\"'bar'"
Beispiel #31
0
def test_show_argv_rightbrace():
    assert show_argv("foo}bar") == "'foo}bar'"
Beispiel #32
0
def test_show_argv_leftparen():
    assert show_argv("foo(bar") == "'foo(bar'"
Beispiel #33
0
def test_show_argv_delete():
    assert show_argv('foo\x7Fbar') == r"$'foo\x7fbar'"
Beispiel #34
0
def test_show_argv_rightparen():
    assert show_argv("foo)bar") == "'foo)bar'"
Beispiel #35
0
def test_show_argv_nbsp():
    assert show_argv('foo\xA0bar') == r"$'foo\xa0bar'"
Beispiel #36
0
def test_show_argv_asterisk():
    assert show_argv("foo*bar") == r"'foo*bar'"
Beispiel #37
0
def test_show_argv_utf8():
    assert show_argv('foo\xC3\xA9bar') == r"$'foo\xc3\xa9bar'"
Beispiel #38
0
def test_show_argv_plus():
    assert show_argv("foo+bar") == "foo+bar"
Beispiel #39
0
def test_show_argv_unicode():
    ### TODO: Assumes sys.getfilesystemencoding() == 'utf-8'
    assert show_argv('fooébar') == r"$'foo\xc3\xa9bar'"
Beispiel #40
0
def test_show_argv_comma():
    assert show_argv("foo,bar") == "foo,bar"
Beispiel #41
0
def test_show_argv_backspace():
    assert show_argv("foo\bbar") == r"$'foo\bbar'"
Beispiel #42
0
def test_show_argv_hyphen():
    assert show_argv("foo-bar") == "foo-bar"
Beispiel #43
0
def test_show_argv_linefeed():
    assert show_argv("foo\nbar") == r"$'foo\nbar'"
Beispiel #44
0
def test_show_argv_period():
    assert show_argv("foo.bar") == "foo.bar"
Beispiel #45
0
def test_show_argv_formfeed():
    assert show_argv("foo\fbar") == r"$'foo\fbar'"
Beispiel #46
0
def test_show_argv_slash():
    assert show_argv("foo/bar") == "foo/bar"
Beispiel #47
0
def test_show_argv_escape():
    assert show_argv("foo\x1Bbar") == r"$'foo\ebar'"
Beispiel #48
0
def test_show_argv_1simple():
    assert show_argv('foo') == 'foo'
Beispiel #49
0
def test_show_argv_nothing():
    assert show_argv() == ''
Beispiel #50
0
def test_show_argv_colon():
    assert show_argv("foo:bar") == "foo:bar"
Beispiel #51
0
def test_show_argv_quote():
    assert show_argv("foo\"bar") == "'foo\"bar'"
Beispiel #52
0
def test_show_argv_semicolon():
    assert show_argv("foo;bar") == "'foo;bar'"
Beispiel #53
0
def test_show_argv_dollar():
    assert show_argv("foo$bar") == "'foo$bar'"
Beispiel #54
0
def test_show_argv_lessthan():
    assert show_argv("foo<bar") == "'foo<bar'"
Beispiel #55
0
def test_show_argv_ampersand():
    assert show_argv("foo&bar") == "'foo&bar'"
Beispiel #56
0
def test_show_argv_equals():
    assert show_argv("foo=bar") == r"'foo=bar'"
Beispiel #57
0
def test_show_argv_leftparen():
    assert show_argv("foo(bar") == "'foo(bar'"
Beispiel #58
0
def test_show_argv_vbar():
    assert show_argv("foo|bar") == "'foo|bar'"
Beispiel #59
0
def test_show_argv_asterisk():
    assert show_argv("foo*bar") == r"'foo*bar'"
Beispiel #60
0
def test_show_argv_backspace():
    assert show_argv("foo\bbar") == r"$'foo\bbar'"