comfy-table 0.0.7

An easy to use library for building beautiful tables with automatic content wrapping
Documentation
use pretty_assertions::assert_eq;

use comfy_table::*;

#[test]
fn missing_column_table() {
    let mut table = Table::new();
    table
        .set_header(&vec!["Header1", "Header2", "Header3"])
        .add_row(&vec!["One One", "One Two", "One Three"])
        .add_row(&vec!["Two One", "Two Two", "Two Three"])
        .add_row(&vec!["Three One", "Three Two", "Three Three"]);

    let column = table.get_column_mut(0).unwrap();
    column.set_padding((5, 5));
    let column = table.get_column_mut(2).unwrap();
    column.set_padding((0, 0));

    println!("{}", table.to_string());
    let expected = "
+-------------------+-----------+-----------+
|     Header1       | Header2   |Header3    |
+===========================================+
|     One One       | One Two   |One Three  |
|-------------------+-----------+-----------|
|     Two One       | Two Two   |Two Three  |
|-------------------+-----------+-----------|
|     Three One     | Three Two |Three Three|
+-------------------+-----------+-----------+";
    assert_eq!("\n".to_string() + &table.to_string(), expected);
}