mirror of
https://github.com/openwrt/packages.git
synced 2026-04-15 19:02:09 +00:00
Full release notes: https://github.com/chardet/chardet/releases/tag/7.0.1 Add 'python3-codecs' as dependency. No idea when (or if) this was ever needed, but it became obvious after test.sh was added. Signed-off-by: Alexandru Ardelean <alex@shruggie.ro>
14 lines
270 B
Bash
14 lines
270 B
Bash
#!/bin/sh
|
|
|
|
[ "$1" = python3-chardet ] || exit 0
|
|
|
|
python3 - << 'EOF'
|
|
import chardet
|
|
|
|
result = chardet.detect(b'Hello, World!')
|
|
assert result['encoding'] is not None
|
|
|
|
result = chardet.detect('Привет мир'.encode('utf-8'))
|
|
assert result['encoding'] is not None
|
|
EOF
|