@@ -365,6 +365,7 @@ mod tests {
365
365
"(true == false) == true" ,
366
366
"(true == (false || true && (true || false))) == true" ,
367
367
"(github.actor != 'github-actions[bot]' && github.actor) == 'BrewTestBot'" ,
368
+ "fromJson(steps.runs.outputs.data).workflow_runs[0].id" ,
368
369
] ;
369
370
370
371
for case in cases {
@@ -413,17 +414,19 @@ mod tests {
413
414
( "foo.bar.baz" , Expr :: Context ( "foo.bar.baz" . into ( ) ) ) ,
414
415
(
415
416
"foo.bar.baz[1][2]" ,
416
- Expr :: Index {
417
- parent : Expr :: Context ( "foo.bar.baz" . into ( ) ) . into ( ) ,
418
- indices : vec ! [ Expr :: Number ( 1.0 ) , Expr :: Number ( 2.0 ) ] ,
419
- } ,
417
+ Expr :: Context ( "foo.bar.baz[1][2]" . into ( ) ) ,
418
+ // Expr::Index {
419
+ // parent: Expr::Context("foo.bar.baz".into()).into(),
420
+ // indices: vec![Expr::Number(1.0), Expr::Number(2.0)],
421
+ // },
420
422
) ,
421
423
(
422
424
"foo.bar.baz[*]" ,
423
- Expr :: Index {
424
- parent : Expr :: Context ( "foo.bar.baz" . into ( ) ) . into ( ) ,
425
- indices : vec ! [ Expr :: Star ] ,
426
- } ,
425
+ Expr :: Context ( "foo.bar.baz[*]" . into ( ) ) ,
426
+ // Expr::Index {
427
+ // parent: Expr::Context("foo.bar.baz".into()).into(),
428
+ // indices: vec![Expr::Star],
429
+ // },
427
430
) ,
428
431
(
429
432
"vegetables.*.ediblePortions" ,
@@ -473,7 +476,18 @@ mod tests {
473
476
op : BinOp :: Or , rhs : Expr :: Boolean ( false ) . into ( )
474
477
} . into ( )
475
478
}
476
- )
479
+ ) ,
480
+ (
481
+ // BUG: AST is incorrect here
482
+ "fromJson(steps.runs.outputs.data).workflow_runs[0].id" ,
483
+ Expr :: Call {
484
+ func : "fromJson" . into ( ) ,
485
+ args : vec ! [
486
+ Expr :: Context ( "steps.runs.outputs.data" . into( ) ) . into( ) ,
487
+ Expr :: Context ( "workflow_runs[0].id" . into( ) ) . into( ) ,
488
+ ]
489
+ }
490
+ ) ,
477
491
] ;
478
492
479
493
for ( case, expr) in cases {
0 commit comments