Open Bobronium opened 2 years ago
Oh, I forgot to post the issue that answers why I didn't propose stdin.buffer.read()
...
Probably should've opened it in the first place :)
Interesting. Tests are failing because of the difference between sort on macOS and Ubuntu.
How should we handle this, @hauntsaninja?
On Ubuntu:
$ echo "1\nš\n2\n3" | sort
š
1
2
3
On macOS:
$ echo "1\nš\n2\n3" | sort
1
2
3
š
With pyp (python sort):
~/dev/contrib/pyp on ī patch-1 (.venv)
$ echo "1\nš\n2\n3" | pyp "sorted(lines)"
1
2
3
š
Oh, interesting. This kind of thing is why I like pyp ;-)
Maybe we just remove the emoji from the tests. It doesn't really test the behaviour of pyp itself. The commands in the README are only approximately "like" the standard shell commands, so we don't need to have tests that enforce that they super faithfully match the standard shell commands.
Ok, I've seen your comment way too late :)
I woke up with an idea how we can deal with it, keeping emoji (example of UTF-8 input) and shining the light on potential differences between platforms.
Basically, I moved arguments from individual calls to compare_command
into parametrize
cases, which to threat each case individually and then xfail
ed sort with emoji (leaving one without emoji intact)