1
0
mirror of https://github.com/Llewellynvdm/starship.git synced 2024-09-09 05:39:01 +00:00
starship/tests/testsuite/aws.rs
Thomas O'Donnell a18408e30c fix: Fix the spacing around the AWS default symbol (#529)
This updates the default AWS default symbol to include a space after the
symbol to make it a little bit more readable. Have also updated the
README to include the AWS module.
2019-10-14 22:56:16 +09:00

26 lines
673 B
Rust

use ansi_term::Color;
use std::io;
use crate::common;
#[test]
fn no_profile_set() -> io::Result<()> {
let output = common::render_module("aws").env_clear().output()?;
let expected = "";
let actual = String::from_utf8(output.stdout).unwrap();
assert_eq!(expected, actual);
Ok(())
}
#[test]
fn profile_set() -> io::Result<()> {
let output = common::render_module("aws")
.env_clear()
.env("AWS_PROFILE", "astronauts")
.output()?;
let expected = format!("on {} ", Color::Yellow.bold().paint("☁️ astronauts"));
let actual = String::from_utf8(output.stdout).unwrap();
assert_eq!(expected, actual);
Ok(())
}