figue 4.0.1

Type-safe CLI arguments, config files, and environment variables powered by Facet reflection
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
/// Do snapshot testing for a diagnostic error
#[macro_export]
macro_rules! assert_diag_snapshot {
    ($err:expr) => {
        insta::assert_snapshot!(strip_ansi_escapes::strip_str(&$err.to_string()))
    };
}

/// Do snapshot testing for help text (strips ANSI codes)
#[macro_export]
macro_rules! assert_help_snapshot {
    ($help:expr) => {
        insta::assert_snapshot!(strip_ansi_escapes::strip_str(&$help))
    };
    ($name:expr, $help:expr) => {
        insta::assert_snapshot!($name, strip_ansi_escapes::strip_str(&$help))
    };
}