mirror of
https://github.com/starship/starship.git
synced 2026-06-23 02:05:51 +07:00
test: refactor ruby and php modules to use mocked commands (#936)
This commit is contained in:
@@ -59,6 +59,16 @@ pub fn exec_cmd(cmd: &str, args: &[&str]) -> Option<CommandOutput> {
|
||||
stdout: String::from("v12.0.0"),
|
||||
stderr: String::default(),
|
||||
}),
|
||||
"php -r echo PHP_MAJOR_VERSION.'.'.PHP_MINOR_VERSION.'.'.PHP_RELEASE_VERSION;" => {
|
||||
Some(CommandOutput {
|
||||
stdout: String::from("7.3.8"),
|
||||
stderr: String::default(),
|
||||
})
|
||||
}
|
||||
"ruby -v" => Some(CommandOutput {
|
||||
stdout: String::from("ruby 2.5.1p57 (2018-03-29 revision 63029) [x86_64-linux-gnu]"),
|
||||
stderr: String::default(),
|
||||
}),
|
||||
"stack ghc -- --numeric-version --no-install-ghc" => Some(CommandOutput {
|
||||
stdout: String::from("8.6.5"),
|
||||
stderr: String::default(),
|
||||
|
||||
Reference in New Issue
Block a user