added tests and method to convert styledobject into displayableobject
This commit is contained in:
parent
a92274c028
commit
3d7748ba3d
@ -22,9 +22,14 @@ use crossterm::style::{style, Color, DisplayableObject};
|
|||||||
use crossterm::terminal::terminal;
|
use crossterm::terminal::terminal;
|
||||||
use crossterm::Screen;
|
use crossterm::Screen;
|
||||||
|
|
||||||
|
use crossterm::output::TerminalOutput;
|
||||||
|
|
||||||
fn main()
|
fn main()
|
||||||
{
|
{
|
||||||
let screen = Screen::default();
|
let screen = Screen::default();
|
||||||
|
let output = TerminalOutput::new(false);
|
||||||
|
|
||||||
println!("\nExample:\n\n\taws --profile {} s3 ls\n", DisplayableObject::new(&screen, &style("test").with(Color::Yellow)));
|
let bytes = "test".as_bytes();
|
||||||
|
let result = output.write_str("test");
|
||||||
|
println!("bytes: {} written: {}", bytes.len(), result.unwrap());
|
||||||
}
|
}
|
||||||
|
0
src/modules/cursor/test.rs
Normal file
0
src/modules/cursor/test.rs
Normal file
0
src/modules/output/test.rs
Normal file
0
src/modules/output/test.rs
Normal file
0
src/modules/style/test.rs
Normal file
0
src/modules/style/test.rs
Normal file
Loading…
Reference in New Issue
Block a user