| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
import subprocess |
| 9 |
|
| 10 |
from rsyncfns import TOOLDIR, test_fail, test_skipped |
| 11 |
|
| 12 |
helper = TOOLDIR / 't_iwildmatch' |
| 13 |
if not helper.is_file(): |
| 14 |
test_skipped("t_iwildmatch helper not built") |
| 15 |
|
| 16 |
proc = subprocess.run([str(helper)], stdout=subprocess.PIPE, stderr=subprocess.PIPE, |
| 17 |
timeout=30) |
| 18 |
if proc.returncode != 0: |
| 19 |
test_fail("iwildmatch case-fold is asymmetric (pattern not folded)\n" |
| 20 |
+ (proc.stdout or b'').decode('utf-8', 'replace') |
| 21 |
+ (proc.stderr or b'').decode('utf-8', 'replace')) |
| 22 |
print((proc.stdout or b'').decode('utf-8', 'replace').strip()) |