dotenv 0.15.0

A `dotenv` implementation for Rust
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
mod common;

use std::env;
use dotenv::*;

use crate::common::*;

#[test]
fn test_from_filename() {
    let dir = make_test_dotenv().unwrap();

    from_filename(".env").ok();

    assert_eq!(env::var("TESTKEY").unwrap(), "test_val");

    env::set_current_dir(dir.path().parent().unwrap()).unwrap();
    dir.close().unwrap();
}