use zfish::term::Terminal;
#[test]
fn test_terminal_size() {
let size = Terminal::size();
match size {
Some((width, height)) => {
assert!(width > 0);
assert!(height > 0);
println!("Terminal size: {}x{}", width, height);
}
None => {
println!("No terminal detected (likely running in CI/non-TTY environment)");
}
}
}
#[test]
#[ignore]
fn test_terminal_clear() {
println!("The screen will clear in 2 seconds...");
std::thread::sleep(std::time::Duration::from_secs(2));
Terminal::clear_screen().unwrap();
println!("Screen should be cleared now");
}
#[test]
#[ignore]
fn test_cursor_movement() {
Terminal::clear_screen().unwrap();
println!("This is at the default position");
Terminal::print_at(10, 20, "This text should be at row 10, column 20").unwrap();
Terminal::move_cursor(20, 1).unwrap();
println!("Back at the bottom");
}