File tree Expand file tree Collapse file tree 3 files changed +25
-198
lines changed
test-generator/lib_generator Expand file tree Collapse file tree 3 files changed +25
-198
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -7,11 +7,9 @@ let ae exp got _test_ctxt =
7
7
8
8
let tests = [
9
9
{ {#cases} }
10
- { {#cases} }
11
- "{ {description} }" >::
12
- ae { {#input} }{ {expected} }
13
- ({ {property} } { {input} });{ {/input} }
14
- { {/cases} }
10
+ "{ {description} }" >::
11
+ ae { {#input} }{ {expected} }
12
+ ({ {property} } { {input} });{ {/input} }
15
13
{ {/cases} }
16
14
]
17
15
Original file line number Diff line number Diff line change @@ -466,9 +466,30 @@ let edit_grade_school_case (case: json): json =
466
466
]) input)
467
467
]) case
468
468
469
- let edit_case ~(slug : string ) (case : json ) = match (slug, case) with
469
+ let edit_etl_case (case : Yojson.Basic.t ) : Yojson.Basic.t =
470
+ let legacy_contents =
471
+ case
472
+ |> Util. member " input"
473
+ |> Util. member " legacy"
474
+ |> Util. to_assoc
475
+ |> fun l -> `Assoc l
476
+ in
477
+ let updated_case =
478
+ case
479
+ |> Util. to_assoc
480
+ |> List. map ~f: (fun (k , v ) ->
481
+ if String. (k = " input" ) then (k, legacy_contents) else (k, v)
482
+ )
483
+ |> fun l -> `Assoc l
484
+ in
485
+ updated_case
486
+
487
+
488
+ let edit_case ~(slug : string ) (case : json ) =
489
+ match (slug, case) with
470
490
| ("allergies" , case ) -> edit_allergies_case case
471
491
| ("custom-set" , case ) -> edit_custom_set_case case
492
+ | ("etl" , case ) -> edit_etl_case case
472
493
| ("grade-school" , case ) -> edit_grade_school_case case
473
494
| ("difference-of-squares" , case ) -> edit_difference_of_squares_case case
474
495
| ("run-length-encoding" , case ) -> edit_run_length_encoding_case case
You can’t perform that action at this time.
0 commit comments