]> arthur.barton.de Git - bup.git/blob - test/ext/test_argv.py
test-fuse: improve/broaden applicability checks
[bup.git] / test / ext / test_argv.py
1
2 from __future__ import absolute_import, print_function
3
4 from random import randint
5 from subprocess import CalledProcessError, check_output
6 from sys import stderr, stdout
7
8
9 from test.lib.wvpytest import wvpasseq
10
11 def rand_bytes(n):
12     return bytes([randint(1, 255) for x in range(n)])
13
14 def test_argv():
15     for trial in range(100):
16         cmd = [b'dev/echo-argv-bytes', rand_bytes(randint(1, 32))]
17         out = check_output(cmd)
18         wvpasseq(b'\0\n'.join(cmd) + b'\0\n', out)