Skip to content

Commit 839ec56

Browse files
committed
decrease version to 0.15.12 & few more tests
This MR only adds a new function to the API so that's a minor change, which are the z component in 0.y.z versions.
1 parent ed700f8 commit 839ec56

File tree

3 files changed

+12
-2
lines changed

3 files changed

+12
-2
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
Newer changelog entries can be found [on
44
GitHub](https://github.com/console-rs/console/releases).
55

6-
## 0.16.0
6+
## 0.15.12
77

88
### Enhancements
99

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
22
name = "console"
33
description = "A terminal and console abstraction for Rust"
4-
version = "0.16.0"
4+
version = "0.15.12"
55
keywords = ["cli", "terminal", "colors", "console", "ansi"]
66
authors = ["Armin Ronacher <armin.ronacher@active-4.com>"]
77
license = "MIT"

src/utils.rs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1032,6 +1032,11 @@ fn test_slice_ansi_str() {
10321032
let test_str = "Hello\x1b[31m🐶\x1b[1m🐶\x1b[0m world!";
10331033
assert_eq!(slice_str(test_str, "", 0..test_str.len(), ""), test_str);
10341034

1035+
assert_eq!(
1036+
slice_str(test_str, ">>>", 0..test_str.len(), "<<<"),
1037+
format!(">>>{test_str}<<<"),
1038+
);
1039+
10351040
if cfg!(feature = "unicode-width") && cfg!(feature = "ansi-parsing") {
10361041
assert_eq!(measure_text_width(test_str), 16);
10371042

@@ -1064,6 +1069,11 @@ fn test_slice_ansi_str() {
10641069
slice_str(test_str, "", 7..21, ""),
10651070
"\x1b[31m\x1b[1m🐶\x1b[0m world!"
10661071
);
1072+
1073+
assert_eq!(
1074+
slice_str(test_str, ">>>", 7..21, "<<<"),
1075+
"\x1b[31m>>>\x1b[1m🐶\x1b[0m world!<<<"
1076+
);
10671077
}
10681078
}
10691079

0 commit comments

Comments
 (0)