From 02057ba30b3fdfe75de30f9ad18f145c4b7feef3 Mon Sep 17 00:00:00 2001 From: phanirithvij Date: Sun, 20 Oct 2024 10:43:59 +0530 Subject: [PATCH] espanso: fix test Signed-off-by: phanirithvij --- tests/modules/services/espanso/basic-configuration.nix | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/tests/modules/services/espanso/basic-configuration.nix b/tests/modules/services/espanso/basic-configuration.nix index 6d04c53d2..51a1fee99 100644 --- a/tests/modules/services/espanso/basic-configuration.nix +++ b/tests/modules/services/espanso/basic-configuration.nix @@ -42,8 +42,16 @@ nmt.script = '' serviceFile=home-files/.config/systemd/user/espanso.service + expectedServiceFile=${./basic-configuration.service} assertFileExists "$serviceFile" - assertFileContent "$serviceFile" ${./basic-configuration.service} + assertFileRegex "$serviceFile" 'ExecStart=.*/bin/espanso launcher' + if [[ $(uname) == "Linux" ]]; then + grep -v "/bin/espanso launcher" "$(_abs $serviceFile)" > espanso-service.actual + grep -v "/bin/espanso launcher" "$expectedServiceFile" > espanso-service.expected + assertFileContent "$(realpath espanso-service.actual)" espanso-service.expected + else + assertFileContent "$serviceFile" "$expectedServiceFile" + fi configFile=home-files/.config/espanso/config/default.yml assertFileExists "$configFile"