| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
import subprocess |
| 8 |
|
| 9 |
from rsyncfns import TOOLDIR, test_fail, test_skipped |
| 10 |
|
| 11 |
helper = TOOLDIR / 't_clean_fname' |
| 12 |
if not helper.is_file(): |
| 13 |
test_skipped("t_clean_fname helper not built") |
| 14 |
|
| 15 |
proc = subprocess.run([str(helper)], stdout=subprocess.PIPE, stderr=subprocess.PIPE, |
| 16 |
timeout=30) |
| 17 |
if proc.returncode != 0: |
| 18 |
test_fail("clean_fname CFN_COLLAPSE_DOT_DOT_DIRS off-by-one (collapse dead)\n" |
| 19 |
+ (proc.stdout or b'').decode('utf-8', 'replace') |
| 20 |
+ (proc.stderr or b'').decode('utf-8', 'replace')) |
| 21 |
print((proc.stdout or b'').decode('utf-8', 'replace').strip()) |