As requested, I've added a padding of 4 characters (plus the unit and an extra space in the <span> output) so the output on the bar isn't jittering whenever units and measurements are changing.
I've also completely rewritten the tests to actually use mocked values (using umockdev) instead of trying to come up with a magical regular expression.
The script should break much less now, especially on upgrades.
I believe I forgot to push two extra commits that are showing up in this PR now. They are safe to merge as well though (adding a line feed and .editorconfig).
As requested, I've added a padding of 4 characters (plus the unit and an extra space in the
<span>
output) so the output on the bar isn't jittering whenever units and measurements are changing.I've also completely rewritten the tests to actually use mocked values (using
umockdev
) instead of trying to come up with a magical regular expression.The script should break much less now, especially on upgrades.