do not use 'sort' - produces different result on Windows

Might be fixable with Locale setting (https://stackoverflow.com/a/39172728), but it's easier just not to depend on it.
This commit is contained in:
Denis Bilenko 2025-01-27 10:27:56 +01:00
parent 0ab4d27d80
commit f2f7ddf1a2
2 changed files with 9 additions and 1 deletions

8
acceptance/bin/sort_lines.py Executable file
View File

@ -0,0 +1,8 @@
#!/usr/bin/env python3
"""
Helper to sort lines in text file. Similar to 'sort' but no dependence on locale or presence of 'sort' in PATH.
"""
import sys
lines = sys.stdin.readlines()
lines.sort()
sys.stdout.write("".join(lines))

View File

@ -1,3 +1,3 @@
$CLI bundle validate --debug > out.stdout.txt 2> full.stderr.txt
grep -vw parallel full.stderr.txt > out.stderr.txt
grep -w parallel full.stderr.txt | sort > out.stderr.parallel.txt
grep -w parallel full.stderr.txt | sort_lines.py > out.stderr.parallel.txt