From b014ce13da89cd16453bd6a46f5e1c893bf74fc5 Mon Sep 17 00:00:00 2001 From: Vidar Holen Date: Wed, 30 Jul 2025 09:55:00 -0700 Subject: [PATCH] Add unit tests for function names with "#" --- src/ShellCheck/Parser.hs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/ShellCheck/Parser.hs b/src/ShellCheck/Parser.hs index 973e520..f8a94bc 100644 --- a/src/ShellCheck/Parser.hs +++ b/src/ShellCheck/Parser.hs @@ -2759,6 +2759,8 @@ prop_readFunctionDefinition10 = isOk readFunctionDefinition "function foo () { t prop_readFunctionDefinition11 = isWarning readFunctionDefinition "function foo{\ntrue\n}" prop_readFunctionDefinition12 = isOk readFunctionDefinition "function []!() { true; }" prop_readFunctionDefinition13 = isOk readFunctionDefinition "@require(){ true; }" +prop_readFunctionDefinition14 = isOk readFunctionDefinition "foo#bar(){ :; }" +prop_readFunctionDefinition15 = isNotOk readFunctionDefinition "#bar(){ :; }" readFunctionDefinition = called "function" $ do start <- startSpan functionSignature <- try readFunctionSignature