diff options
| author | Julian Hurst <julian.hurst@digdash.com> | 2025-03-20 11:31:11 +0100 |
|---|---|---|
| committer | Julian Hurst <julian.hurst@digdash.com> | 2025-03-20 11:31:11 +0100 |
| commit | 8d4bc50570fcb9654ba6fe931dc937ea476b659e (patch) | |
| tree | 85f7576006a82469f1d0b83dc99eef69afaaaaef /tests | |
| parent | a65da39854d650498ce20dedca423cd17b3a87e0 (diff) | |
| parent | 6e8a2af6bd47fd05e6b22937c5da7397549e7cbb (diff) | |
| download | hare-tui-8d4bc50570fcb9654ba6fe931dc937ea476b659e.tar.gz | |
Merge branch 'master' into nomem
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/runewidth.ha | 9 | ||||
| -rw-r--r-- | tests/strwidth.ha | 6 |
2 files changed, 15 insertions, 0 deletions
diff --git a/tests/runewidth.ha b/tests/runewidth.ha new file mode 100644 index 0000000..5e570a5 --- /dev/null +++ b/tests/runewidth.ha @@ -0,0 +1,9 @@ +use tui; + +@test +fn runewidth() void = { + assert(tui::runewidth('f') == 1); + assert(tui::runewidth('ๅคง') == 2); + assert(tui::runewidth('ใ') == 2); + assert(tui::runewidth('๐') == 2); +}; diff --git a/tests/strwidth.ha b/tests/strwidth.ha new file mode 100644 index 0000000..e3863d6 --- /dev/null +++ b/tests/strwidth.ha @@ -0,0 +1,6 @@ +use tui; + +@test +fn strwidth() void = { + assert(tui::strwidth("ๅคงใ๐f") == 7); +}; |
