[llvm] [llvm-lit][test] Precommit tests for curly braces in lit internal shell (PR #102976)
Paul Kirth via llvm-commits
llvm-commits at lists.llvm.org
Thu Aug 15 13:42:08 PDT 2024
================
@@ -0,0 +1,19 @@
+## Test curly braces used in grouping commands.
+
+## Test one command inside curly brace.
+# RUN: { echo bar; } | FileCheck --check-prefix=ONE-CMD %s
+
+# ONE-CMD: bar
+
+## Test two commands inside curly brace.
+# RUN: { echo foo; echo bar; } | FileCheck --check-prefix=TWO-CMDS %s
+
+# TWO-CMDS: foo
+# TWO-CMDS: bar
+
+## Test nested curly brace.
+# RUN: { echo foo > %t/temp.txt; { echo bar; echo baz; }; cat %t/temp.txt; } | FileCheck --check-prefix=NESTED %s
+
+# NESTED: bar
+# NESTED: baz
+# NESTED: foo
----------------
ilovepi wrote:
```suggestion
# NESTED: bar
# NESTED-NEXT: baz
# NESTED-NEXT: foo
```
https://github.com/llvm/llvm-project/pull/102976
More information about the llvm-commits
mailing list