mirror of
https://github.com/starship/starship.git
synced 2026-06-23 02:05:51 +07:00
feat: add singularity module (#932)
This commit is contained in:
@@ -18,6 +18,7 @@ mod line_break;
|
||||
mod modules;
|
||||
mod nix_shell;
|
||||
mod python;
|
||||
mod singularity;
|
||||
mod terraform;
|
||||
mod time;
|
||||
mod username;
|
||||
|
||||
@@ -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(())
|
||||
}
|
||||
Reference in New Issue
Block a user