mirror of
https://github.com/starship/starship.git
synced 2024-12-25 16:48:55 +01:00
08cf33522a
Co-authored-by: Tiffany Le-Nguyen <tlenguyen@expedia.com> Co-authored-by: Matan Kushner <hello@matchai.me>
35 lines
799 B
Rust
35 lines
799 B
Rust
use ansi_term::Color;
|
||
use std::io;
|
||
|
||
use crate::common::{self, TestCommand};
|
||
|
||
#[test]
|
||
fn char_symbol_configuration() -> io::Result<()> {
|
||
let expected = format!("{} ", Color::Green.bold().paint("❯"));
|
||
|
||
let output = common::render_module("character")
|
||
.use_config(toml::toml! {
|
||
[character]
|
||
symbol = "❯"
|
||
})
|
||
.output()?;
|
||
let actual = String::from_utf8(output.stdout).unwrap();
|
||
assert_eq!(expected, actual);
|
||
|
||
Ok(())
|
||
}
|
||
|
||
#[test]
|
||
fn disabled_module() -> io::Result<()> {
|
||
let output = common::render_module("package")
|
||
.use_config(toml::toml! {
|
||
[package]
|
||
disabled = true
|
||
})
|
||
.output()?;
|
||
let actual = String::from_utf8(output.stdout).unwrap();
|
||
assert_eq!("", actual);
|
||
|
||
Ok(())
|
||
}
|