feat: add singularity module (#932)

This commit is contained in:
Tadej Novak
2020-02-26 17:18:19 +01:00
committed by GitHub
parent 15f4202df1
commit 7e66791cb2
9 changed files with 106 additions and 0 deletions
+1
View File
@@ -18,6 +18,7 @@ mod line_break;
mod modules;
mod nix_shell;
mod python;
mod singularity;
mod terraform;
mod time;
mod username;
+18
View File
@@ -0,0 +1,18 @@
use ansi_term::Color;
use std::io;
use crate::common;
#[test]
fn env_set() -> io::Result<()> {
let output = common::render_module("singularity")
.env_clear()
.env("SINGULARITY_NAME", "centos.img")
.output()?;
let expected = format!("{} ", Color::Blue.bold().dimmed().paint("[centos.img]"));
let actual = String::from_utf8(output.stdout).unwrap();
assert_eq!(expected, actual);
Ok(())
}