i3status_ext 0.1.0-beta.3

extend i3status
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
// Note this useful idiom: importing names from outer (for mod tests) scope.
use super::*;

fn generate() -> String {
    let mut result: String = "{\"version\":1}\n[\n[".to_string();
    result.push_str("{");
    result.push_str(&format!("\"name\": \"My Name\",\"instance\": \"My Instance\",\"markup\": \"My Markup\",\"full_text\": \"My Full Text\""));
    result.push_str("}\n");
    return result;
}

#[test]
fn test_position() {
    // open stdin and stdout
    let input = generate();
    let mut io = begin_str(&input).unwrap();
    update(&mut io, "new", 0, false, "new text").unwrap();
}