tests: Regex the width tests

Some wcwidths are old.

Belongs to #7340.
This commit is contained in:
Fabian Homborg 2020-09-28 17:48:42 +02:00
parent d6d3abf59a
commit dfcb4b811c

View file

@ -56,16 +56,17 @@ echo \|(string pad --width 10 --right foo)\|
# Pad string with multi-width emoji.
string pad -w 4 -c . 🐟
# CHECK: ..🐟
# NOTE: These are regex'd because the testing system might have an older/newer wcwidth.
# CHECK: .{{.*}}🐟
# Pad with multi-width character.
string pad -w 3 -c 🐟 .
# CHECK: 🐟.
# CHECK: {{🐟+}}.
# Multi-width pad with remainder, complemented with a space.
string pad -w 4 -c 🐟 k kk
# CHECK: 🐟 k
# CHECK: 🐟kk
# CHECK: {{🐟+}} k
# CHECK: {{🐟+}}kk
# Pad to the maximum length.
string pad -c . long longer longest