mirror of
https://github.com/crate-ci/typos.git
synced 2026-10-17 17:45:10 +02:00
This is rustc/cargo's renderer and has all of the lessons of those, including - Unicode support - Line wrapping / eliding of text to fit on screen As part of this, we are now rendering file name typos like file content typos.
68 lines
1.8 KiB
TOML
68 lines
1.8 KiB
TOML
bin.name = "typos"
|
|
args = "-"
|
|
status.code = 2
|
|
stdin = '''
|
|
---
|
|
Korean character (NFC)
|
|
Grapheme clusters: 1, codepoints: 1, UnicodeWidthStr::width() == 2
|
|
|
|
한 Apropriate world
|
|
^^^^^^^^^^ highlight here
|
|
|
|
---
|
|
Korean character (NFD).
|
|
Grapheme clusters: 1, codepoints: 3, UnicodeWidthStr::width() == 2
|
|
|
|
한 Apropriate world
|
|
^^^^^^^^^^ highlight here
|
|
|
|
---
|
|
Eye in Speech Bubble Emoji (U+1F441 U+FE0F U+200D U+1F5E8 U+FE0F, Recommended Emoji ZWJ Sequences, v2.0)
|
|
Grapheme clusters: 1, codepoints: 5, UnicodeWidthStr::width() == 2 (Read NOTE: https://github.com/unicode-rs/unicode-width)
|
|
|
|
👁️🗨️ Apropriate world
|
|
^^^^^^^^^^ highlight here
|
|
|
|
---
|
|
Face with spiral eyes (U+1F635 U+200D U+1F4AB, Recommended Emoji ZWJ Sequence, v13.1)
|
|
Grapheme clusters: 1, codepoints: 3, UnicodeWidthStr::width() == 4 (Read NOTE: https://github.com/unicode-rs/unicode-width)
|
|
|
|
😵💫 Apropriate world
|
|
^^^^^^^^^^ highlight here
|
|
|
|
---
|
|
Horizontal tab (\t, U+09)
|
|
Grapheme clusters: 1, codepoints: 1, UnicodeWidthStr::width() == 0
|
|
|
|
Apropriate world
|
|
^^^^^^^^^^ highlight here
|
|
'''
|
|
stdout = """
|
|
error: `Apropriate` should be `Appropriate`
|
|
╭▸ -:5:3
|
|
│
|
|
5 │ 한 Apropriate world
|
|
╰╴ ━━━━━━━━━━
|
|
error: `Apropriate` should be `Appropriate`
|
|
╭▸ -:12:3
|
|
│
|
|
12 │ 한 Apropriate world
|
|
╰╴ ━━━━━━━━━━
|
|
error: `Apropriate` should be `Appropriate`
|
|
╭▸ -:19:7
|
|
│
|
|
19 │ 👁️🗨️ Apropriate world
|
|
╰╴ ━━━━━━━━━━
|
|
error: `Apropriate` should be `Appropriate`
|
|
╭▸ -:26:5
|
|
│
|
|
26 │ 😵💫 Apropriate world
|
|
╰╴ ━━━━━━━━━━
|
|
error: `Apropriate` should be `Appropriate`
|
|
╭▸ -:33:2
|
|
│
|
|
33 │ Apropriate world
|
|
╰╴ ━━━━━━━━━━
|
|
"""
|
|
stderr = ""
|