Corrected test case broken for locales that uses , instead of . for decimal numbers in human readable form.

This commit is contained in:
Michael Mess
2026-05-30 17:10:00 +02:00
committed by Andrew Tridgell
parent ad3bfab05d
commit 5cf7c50524

View File

@@ -108,7 +108,7 @@ make_data_file(src / 'big', 50_000)
plain = out('-a', '--stats', f'{src}/', f'{TODIR}/').stdout
rmtree(TODIR)
human = out('-a', '-h', '--stats', f'{src}/', f'{TODIR}/').stdout
suffix_re = r'Total file size: [\d.]+[KMG]'
suffix_re = r'Total file size: [\d.,]+[KMG]'
if not re.search(suffix_re, human):
test_fail(f"-h did not use a human-readable unit suffix:\n{human}")
if re.search(suffix_re, plain):