Skip to content

Commit

Permalink
Merge branch 'master' into bold-flag
Browse files Browse the repository at this point in the history
  • Loading branch information
ccmetz committed Oct 20, 2019
2 parents 539b928 + e9d3111 commit 37e62c5
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/ascii_art.rs
Original file line number Diff line number Diff line change
Expand Up @@ -264,36 +264,36 @@ mod test {
#[test]
fn truncate() {
let colors_shim = Vec::new();
assert_eq!(Tokens("").render(&colors_shim, 0, 0), "\u{1b}[37m\u{1b}[0m");
assert_eq!(Tokens("").render(&colors_shim, 0, 0), "\u{1b}[1;37m\u{1b}[0m");

assert_eq!(
Tokens(" ").render(&colors_shim, 0, 0),
"\u{1b}[37m\u{1b}[0m"
"\u{1b}[1;37m\u{1b}[0m"
);
assert_eq!(
Tokens(" ").render(&colors_shim, 0, 5),
"\u{1b}[37m \u{1b}[0m"
"\u{1b}[1;37m \u{1b}[0m"
);
assert_eq!(
Tokens(" ").render(&colors_shim, 1, 5),
"\u{1b}[37m \u{1b}[0m"
"\u{1b}[1;37m \u{1b}[0m"
);
assert_eq!(
Tokens(" ").render(&colors_shim, 3, 5),
"\u{1b}[37m \u{1b}[0m"
"\u{1b}[1;37m \u{1b}[0m"
);
assert_eq!(
Tokens(" ").render(&colors_shim, 0, 4),
"\u{1b}[37m \u{1b}[0m"
"\u{1b}[1;37m \u{1b}[0m"
);
assert_eq!(
Tokens(" ").render(&colors_shim, 0, 3),
"\u{1b}[37m \u{1b}[0m"
"\u{1b}[1;37m \u{1b}[0m"
);

assert_eq!(
Tokens(" {1} {5} {9} a").render(&colors_shim, 4, 10),
"\u{1b}[37m\u{1b}[0m\u{1b}[37m\u{1b}[0m\u{1b}[37m \u{1b}[0m\u{1b}[37m a\u{1b}[0m "
"\u{1b}[1;37m\u{1b}[0m\u{1b}[1;37m\u{1b}[0m\u{1b}[1;37m \u{1b}[0m\u{1b}[1;37m a\u{1b}[0m "
);
}
}

0 comments on commit 37e62c5

Please sign in to comment.