Skip to content

Commit

Permalink
Remove \0 width check
Browse files Browse the repository at this point in the history
  • Loading branch information
gyscos committed Jun 6, 2024
1 parent 07dcae1 commit af7c3d7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cursive-core/src/utils/lines/spans/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@ fn input() -> StyledString {
#[test]
fn test_nuls_have_width_1() {
use unicode_width::UnicodeWidthStr;
assert_eq!("\0".width(), 1, "nul chars should have width 1 since unicode-width 0.1.13, seen here: https://github.com/unicode-rs/unicode-width/commit/4efb1803faa054f1bea3c0457275ad3c8610170b#diff-2ad10836ccce5ac2056d5679cc92449d9ff9094d4ff5c5803f65b5dd1d52ef19R224");

let replacement_char = "\u{FFFD}";
assert_eq!(
replacement_char.width(),
1,
"REPLACEMENT CHAR='{replacement_char}' for nul='\0' chars should be width 1"
"REPLACEMENT CHAR='{replacement_char}' should be width 1"
);
}

Expand Down

0 comments on commit af7c3d7

Please sign in to comment.