From 05c26f9eb08d2684848c8a8ae93a2617f417d842 Mon Sep 17 00:00:00 2001 From: Federico Terzi Date: Wed, 21 Apr 2021 19:25:09 +0200 Subject: [PATCH 1/2] fix(clipboard): add missing linking configuration for Windows --- espanso-clipboard/build.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/espanso-clipboard/build.rs b/espanso-clipboard/build.rs index 2c105a8..6efb07a 100644 --- a/espanso-clipboard/build.rs +++ b/espanso-clipboard/build.rs @@ -29,6 +29,7 @@ fn cc_config() { println!("cargo:rustc-link-lib=static=espansoclipboard"); println!("cargo:rustc-link-lib=dylib=user32"); + println!("cargo:rustc-link-lib=dylib=gdi32"); #[cfg(target_env = "gnu")] println!("cargo:rustc-link-lib=dylib=stdc++"); } From f35eecae88e7b49591650776c74c7ef6c48a03e3 Mon Sep 17 00:00:00 2001 From: Federico Terzi Date: Wed, 21 Apr 2021 19:26:55 +0200 Subject: [PATCH 2/2] fix(render): fix failing test on Windows --- espanso-render/src/extension/shell.rs | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/espanso-render/src/extension/shell.rs b/espanso-render/src/extension/shell.rs index db4ec56..9cdea6e 100644 --- a/espanso-render/src/extension/shell.rs +++ b/espanso-render/src/extension/shell.rs @@ -343,10 +343,13 @@ mod tests { ) } else { Params::from_iter( - vec![( - "cmd".to_string(), - Value::String("echo %ESPANSO_VAR1%".to_string()), - )] + vec![ + ( + "cmd".to_string(), + Value::String("echo %ESPANSO_VAR1%".to_string()), + ), + ("shell".to_string(), Value::String("cmd".to_string())), + ] .into_iter(), ) }; @@ -365,8 +368,13 @@ mod tests { fn invalid_command() { let extension = ShellExtension::new(&PathBuf::new()); - let param = - Params::from_iter(vec![("cmd".to_string(), Value::String("nonexistentcommand".to_string()))].into_iter()); + let param = Params::from_iter( + vec![( + "cmd".to_string(), + Value::String("nonexistentcommand".to_string()), + )] + .into_iter(), + ); assert!(matches!( extension.calculate(&Default::default(), &Default::default(), ¶m), ExtensionResult::Error(_)