envmnt 0.8.3

Environment variables utility functions.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use super::*;
use fsio::error::ErrorInfo;

#[test]
fn format_file_open() {
    let error = EnvmntError {
        kind: ErrorKind::ReadFile(
            "Unable to read file.",
            FsIOError {
                info: ErrorInfo::PathAlreadyExists("test".to_string()),
            },
        ),
    };

    let error_string = error.to_string();
    assert!(error_string.contains("Unable to read file."));
    assert!(error_string.contains("test"));
}