feat: Add conda module (#469)

This commit is contained in:
AppleTheGolden
2019-10-05 20:25:25 +02:00
committed by Kevin Song
parent e911e76e6b
commit 7657af0680
8 changed files with 115 additions and 1 deletions
+29
View File
@@ -0,0 +1,29 @@
use ansi_term::Color;
use std::io;
use crate::common;
#[test]
fn not_in_env() -> io::Result<()> {
let output = common::render_module("conda").env_clear().output()?;
let expected = "";
let actual = String::from_utf8(output.stdout).unwrap();
assert_eq!(expected, actual);
Ok(())
}
#[test]
fn env_set() -> io::Result<()> {
let output = common::render_module("conda")
.env_clear()
.env("CONDA_DEFAULT_ENV", "astronauts")
.output()?;
let expected = format!("via {} ", Color::Green.bold().paint("C astronauts"));
let actual = String::from_utf8(output.stdout).unwrap();
assert_eq!(expected, actual);
Ok(())
}
+1
View File
@@ -2,6 +2,7 @@ mod aws;
mod character;
mod cmd_duration;
mod common;
mod conda;
mod configuration;
mod directory;
mod dotnet;