letlong_color_line="ihi there. \x1b[1mthis\x1b[0m is a preeeeeety long line with \x1b[93mcolors \x1b[92mthat make it \x1b[91mseem longer than it is\x1b[0m /kiosk bitreich.org 70";
letmenu=parse!(long_color_line);
letline=menu.lines.first().unwrap();
assert_eq!(long_color_line.chars().count(),139);
assert_eq!(line.visible_len,MAX_COLS+1);
assert_eq!(line.truncated_len,100);
assert_eq!(
line.text_truncated(long_color_line),
"hi there. \x1b[1mthis\x1b[0m is a preeeeeety long line with \x1b[93mcolors \x1b[92mthat make it \x1b[91mseem longer".to_string()
);
letlong_reg_line="1This is a regular line that is long but also has links and stuff. You are missing a gopher client? Use our kiosk mode. Thanks for coming. Hope you enjoy the fish, it's freshly grown in our lab! /kiosk bitreich.org 70";
letmenu=parse!(long_reg_line);
letline=menu.lines.first().unwrap();
assert_eq!(long_color_line.chars().count(),139);
assert_eq!(line.visible_len,MAX_COLS+1);
assert_eq!(line.truncated_len,MAX_COLS+1);
assert_eq!(
line.text_truncated(long_reg_line),
"This is a regular line that is long but also has links and stuff. You are miss"