Merge branch 'dev-1.x-core' of github.com:federico-terzi/espanso into dev-1.x-core
This commit is contained in:
commit
1e65d2ead6
|
@ -29,6 +29,7 @@ fn cc_config() {
|
||||||
|
|
||||||
println!("cargo:rustc-link-lib=static=espansoclipboard");
|
println!("cargo:rustc-link-lib=static=espansoclipboard");
|
||||||
println!("cargo:rustc-link-lib=dylib=user32");
|
println!("cargo:rustc-link-lib=dylib=user32");
|
||||||
|
println!("cargo:rustc-link-lib=dylib=gdi32");
|
||||||
#[cfg(target_env = "gnu")]
|
#[cfg(target_env = "gnu")]
|
||||||
println!("cargo:rustc-link-lib=dylib=stdc++");
|
println!("cargo:rustc-link-lib=dylib=stdc++");
|
||||||
}
|
}
|
||||||
|
|
|
@ -343,10 +343,13 @@ mod tests {
|
||||||
)
|
)
|
||||||
} else {
|
} else {
|
||||||
Params::from_iter(
|
Params::from_iter(
|
||||||
vec![(
|
vec![
|
||||||
|
(
|
||||||
"cmd".to_string(),
|
"cmd".to_string(),
|
||||||
Value::String("echo %ESPANSO_VAR1%".to_string()),
|
Value::String("echo %ESPANSO_VAR1%".to_string()),
|
||||||
)]
|
),
|
||||||
|
("shell".to_string(), Value::String("cmd".to_string())),
|
||||||
|
]
|
||||||
.into_iter(),
|
.into_iter(),
|
||||||
)
|
)
|
||||||
};
|
};
|
||||||
|
@ -365,8 +368,13 @@ mod tests {
|
||||||
fn invalid_command() {
|
fn invalid_command() {
|
||||||
let extension = ShellExtension::new(&PathBuf::new());
|
let extension = ShellExtension::new(&PathBuf::new());
|
||||||
|
|
||||||
let param =
|
let param = Params::from_iter(
|
||||||
Params::from_iter(vec![("cmd".to_string(), Value::String("nonexistentcommand".to_string()))].into_iter());
|
vec![(
|
||||||
|
"cmd".to_string(),
|
||||||
|
Value::String("nonexistentcommand".to_string()),
|
||||||
|
)]
|
||||||
|
.into_iter(),
|
||||||
|
);
|
||||||
assert!(matches!(
|
assert!(matches!(
|
||||||
extension.calculate(&Default::default(), &Default::default(), ¶m),
|
extension.calculate(&Default::default(), &Default::default(), ¶m),
|
||||||
ExtensionResult::Error(_)
|
ExtensionResult::Error(_)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user