mirror of
https://github.com/openwrt/packages.git
synced 2026-05-31 06:51:51 +08:00
ddd0f93637
This also updates the test.sh script to use an assert. Signed-off-by: Jeffery To <jeffery.to@gmail.com>
14 lines
292 B
Bash
14 lines
292 B
Bash
#!/bin/sh
|
|
|
|
[ "$1" = python3-charset-normalizer ] || exit 0
|
|
|
|
python3 - << 'EOF'
|
|
|
|
from charset_normalizer import from_bytes
|
|
s = 'Bсеки човек има право на образование.'
|
|
byte_str = s.encode('cp1251')
|
|
result = from_bytes(byte_str).best()
|
|
assert str(result) == s
|
|
|
|
EOF
|