From 05f10d441c69032d5061408a9078aa0f761b1121 Mon Sep 17 00:00:00 2001 From: Juliano Solanho Date: Wed, 22 May 2024 16:53:47 -0300 Subject: [PATCH] format --- nri-redis/src/Redis/Script.hs | 2 +- nri-redis/test/Spec/Redis/Script.hs | 24 ++++++++++++------------ 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/nri-redis/src/Redis/Script.hs b/nri-redis/src/Redis/Script.hs index ea84cadb..9c6ea8e1 100644 --- a/nri-redis/src/Redis/Script.hs +++ b/nri-redis/src/Redis/Script.hs @@ -191,4 +191,4 @@ paramValues script' = printScript :: Script a -> Text printScript Script {luaScript, quasiQuotedString, params} = let printableParams = Log.unSecret params - in "Script { luaScript = \"" ++ luaScript ++ "\", quasiQuotedString = \"" ++ quasiQuotedString ++ "\", params = " ++ Debug.toString printableParams ++ " }" + in "Script { luaScript = \"" ++ luaScript ++ "\", quasiQuotedString = \"" ++ quasiQuotedString ++ "\", params = " ++ Debug.toString printableParams ++ " }" diff --git a/nri-redis/test/Spec/Redis/Script.hs b/nri-redis/test/Spec/Redis/Script.hs index 9e02114a..8008f444 100644 --- a/nri-redis/test/Spec/Redis/Script.hs +++ b/nri-redis/test/Spec/Redis/Script.hs @@ -58,13 +58,13 @@ parserTests = |> mapLeft P.errorBundlePretty |> Expect.equal ( Left - "1:3:\n\ - \ |\n\ - \1 | ${}\n\ - \ | ^\n\ - \unexpected '}'\n\ - \expecting anything but '$', '{' or '}' (no records, sorry) or white space\n\ - \" + "1:3:\n\ + \ |\n\ + \1 | ${}\n\ + \ | ^\n\ + \unexpected '}'\n\ + \expecting anything but '$', '{' or '}' (no records, sorry) or white space\n\ + \" ), Test.test "ERROR: nested ${}" <| \_ -> do P.runParser parser "" "asdasd ${ ${ value } }" @@ -117,11 +117,11 @@ thTests = [script|${Key "hi"}|] |> printScript |> Expect.equal "Script { luaScript = \"@arg0\", quasiQuotedString = \"${Key \"hi\"}\", params = [ EvaluatedParam\n { kind = RedisKey , name = \"arg0\" , value = \"\\\"hi\\\"\" }\n] }" - -- We can't test for compile-time errors, but manually test our helpful error message, uncomment - -- the lines below: - -- Test.test "compilation error" <| \_ -> - -- [script|${123}|] - -- |> Expect.equal "Doesn't matter, this won't compile" + -- We can't test for compile-time errors, but manually test our helpful error message, uncomment + -- the lines below: + -- Test.test "compilation error" <| \_ -> + -- [script|${123}|] + -- |> Expect.equal "Doesn't matter, this won't compile" ] mapLeft :: (a -> c) -> Either a b -> Either c b