[llvm] [lit] Update internal shell lexer to handle LLDB persistent vars. (PR #156125)
via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 2 17:01:42 PDT 2025
github-actions[bot] wrote:
<!--LLVM CODE FORMAT COMMENT: {darker}-->
:warning: Python code formatter, darker found issues in your code. :warning:
<details>
<summary>
You can test this locally with the following command:
</summary>
``````````bash
darker --check --diff -r origin/main...HEAD llvm/utils/lit/lit/ShUtil.py llvm/utils/lit/tests/unit/ShUtil.py
``````````
:warning:
The reproduction instructions above might return results for more than one PR
in a stack if you are using a stacked PR workflow. You can limit the results by
changing `origin/main` to the base branch/commit you want to compare against.
:warning:
</details>
<details>
<summary>
View the diff from darker here.
</summary>
``````````diff
--- tests/unit/ShUtil.py 2025-09-02 23:57:58.000000 +0000
+++ tests/unit/ShUtil.py 2025-09-03 00:01:17.250949 +0000
@@ -26,12 +26,13 @@
self.assertEqual(self.lex(""" "hello\\\\world" """), ["hello\\world"])
self.assertEqual(self.lex(""" he"llo wo"rld """), ["hello world"])
self.assertEqual(self.lex(""" a\\ b a\\\\b """), ["a b", "a\\b"])
self.assertEqual(self.lex(""" "" "" """), ["", ""])
self.assertEqual(self.lex(""" a\\ b """, win32Escapes=True), ["a\\", "b"])
- self.assertEqual(self.lex("\"\\$y = 11\""), ["$y = 11"])
- self.assertEqual(self.lex("\"expr \\$y = 11\""), ["expr $y = 11"])
+ self.assertEqual(self.lex('"\\$y = 11"'), ["$y = 11"])
+ self.assertEqual(self.lex('"expr \\$y = 11"'), ["expr $y = 11"])
+
class TestShParse(unittest.TestCase):
def parse(self, str):
return ShParser(str).parse()
``````````
</details>
https://github.com/llvm/llvm-project/pull/156125
More information about the llvm-commits
mailing list