futtl 0.1.3

Rust bindings for the FUTTL terminal UI library
use crate::Attr;
use crate::Futtl;
use crate::FuttlWin;
use crate::FuttlBox;

#[test]
fn test_init() {
    let mut ctx: FuttlWin = FuttlWin::new(1, Attr::NONE);

    assert_eq!(ctx.get_ctx().has_init, 1);
}

#[test]
fn test_box_init() {
    let mut ctx: FuttlWin = FuttlWin::new(1, Attr::NONE);

    let _child: usize = ctx.create_box(10, 5);

    assert_eq!(ctx.get_ctx().child_count, 1);
}

#[test]
fn test_drawing() {
    let mut ctx: FuttlWin = FuttlWin::new(1, Attr::NONE);

    ctx.set_curs(0, 0);

    ctx.write_str("Hello");

    ctx.show();
}