integration_test.rs 1.04 KB
Newer Older
1
2
3
4
5
6
7
8
use assert_cmd::Command;
use assert_fs::fixture::FileWriteStr;
mod src_models;

#[test]
fn learn_tcp_win8_server() {
    let file = assert_fs::NamedTempFile::new("sample.dot").expect("Safe");
    file.write_str(src_models::LEARN_RES_MASTERCARD_FIX)
9
        // file.write_str(src_models::TCP_WINDOWS8_SERVER)
10
11
12
13
14
15
16
17
18
        .expect("Safe");
    let model = file.path().to_str().expect("Safe");
    Command::new("./target/debug/lsharp-ru")
        .args([
            "-e", "iads", "--rule2", "ads", "--rule3", "ads", "-m", model,
        ])
        .assert()
        .success();
}
Bharat Garhewal's avatar
Bharat Garhewal committed
19
20
21
22
23
24
25
26
27
28
29
30
31
32

// #[test]
// fn redundant_ads_equi_test() {
//     let file = assert_fs::NamedTempFile::new("sample.dot").expect("Safe");
//     file.write_str(src_models::TCP_FREEBSD_SERVER)
//         .expect("Safe");
//     let model = file.path().to_str().expect("Safe");
//     Command::new("./target/debug/lsharp-ru")
//         .args([
//             "-e", "iads", "--rule2", "ads", "--rule3", "ads", "-m", model, "-l", "10", "-r", "50",
//         ])
//         .assert()
//         .success();
// }