test(parser): add test for pipe in assignment
🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
48be677ea9
commit
f17d8d3a35
|
|
@ -581,6 +581,24 @@ describe('pipe expressions', () => {
|
||||||
Identifier process
|
Identifier process
|
||||||
`)
|
`)
|
||||||
})
|
})
|
||||||
|
|
||||||
|
test('pipe expression in assignment', () => {
|
||||||
|
expect('result = echo hello | grep h').toMatchTree(`
|
||||||
|
Assign
|
||||||
|
Identifier result
|
||||||
|
operator =
|
||||||
|
PipeExpr
|
||||||
|
FunctionCall
|
||||||
|
Identifier echo
|
||||||
|
PositionalArg
|
||||||
|
Identifier hello
|
||||||
|
operator |
|
||||||
|
FunctionCall
|
||||||
|
Identifier grep
|
||||||
|
PositionalArg
|
||||||
|
Identifier h
|
||||||
|
`)
|
||||||
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
describe('multiline', () => {
|
describe('multiline', () => {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user