(command.CommandList
  children: [
    (C {<set>} {<-eu>})
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:WARNING)
          op: assign_op.Equal
          rhs: {(SQ <'\\033[0;31m'>)}
          spids: [12]
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:SUCCESS)
          op: assign_op.Equal
          rhs: {(SQ <'\\033[0;32m'>)}
          spids: [17]
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:INFO)
          op: assign_op.Equal
          rhs: {(SQ )}
          spids: [22]
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:DEBUG)
          op: assign_op.Equal
          rhs: {(SQ )}
          spids: [26]
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:RESET)
          op: assign_op.Equal
          rhs: {(SQ <'\\033[0m'>)}
          spids: [30]
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:VERBOSE)
          op: assign_op.Equal
          rhs: 
            {
              (braced_var_sub
                token: <Id.VSub_Name VERBOSE>
                suffix_op: (suffix_op.Unary tok:<Id.VTest_ColonHyphen ':-'> arg_word:{})
              )
            }
          spids: [35]
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:DIR)
          op: assign_op.Equal
          rhs: 
            {
              (DQ 
                (command_sub
                  left_token: <Id.Left_DollarParen '$('>
                  child: 
                    (command.AndOr
                      ops: [Id.Op_DAmp]
                      children: [
                        (C {<cd>} 
                          {
                            (DQ 
                              (command_sub
                                left_token: <Id.Left_DollarParen '$('>
                                child: 
                                  (C {<dirname>} 
                                    {
                                      (DQ 
                                        (braced_var_sub
                                          token: <Id.VSub_Name BASH_SOURCE>
                                          bracket_op: (bracket_op.ArrayIndex expr:{<Id.Lit_Digits 0>})
                                        )
                                      )
                                    }
                                  )
                              )
                            )
                          }
                        )
                        (C {<pwd>})
                      ]
                    )
                )
              )
            }
          spids: [42]
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:REFMT)
          op: assign_op.Equal
          rhs: {(DQ ($ Id.VSub_DollarName '$DIR') <'/../refmt_impl.native'>)}
          spids: [73]
        )
      ]
    )
    (command.If
      arms: [
        (if_arm
          cond: 
            (condition.Shell
              commands: [
                (command.Sentence
                  child: (command.DBracket expr:(bool_expr.Unary op_id:Id.BoolUnary_f child:{<REFMT>}))
                  terminator: <Id.Op_Semi _>
                )
              ]
            )
          action: [
            (command.Simple
              words: [{<echo>} {(DQ <'Cannot find refmt at '> ($ Id.VSub_DollarName '$REFMT'))}]
              redirects: [(redir op:<Id.Redir_GreatAnd '1>&'> loc:(redir_loc.Fd fd:1) arg:{<2>})]
              do_fork: T
            )
            (command.Sentence
              child: (command.ControlFlow token:<Id.ControlFlow_Exit exit> arg_word:{<1>})
              terminator: <Id.Op_Semi _>
            )
          ]
          spids: [80 91]
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:UNIT_TEST_INPUT)
          op: assign_op.Equal
          rhs: {($ Id.VSub_DollarName '$DIR') <'/unit_tests/input'>}
          spids: [113]
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:UNIT_TEST_OUTPUT)
          op: assign_op.Equal
          rhs: {($ Id.VSub_DollarName '$DIR') <'/unit_tests/actual_output'>}
          spids: [118]
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:UNIT_TEST_EXPECTED_OUTPUT)
          op: assign_op.Equal
          rhs: {($ Id.VSub_DollarName '$DIR') <'/unit_tests/expected_output'>}
          spids: [123]
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:TYPE_TEST_INPUT)
          op: assign_op.Equal
          rhs: {($ Id.VSub_DollarName '$DIR') <'/typeCheckedTests/input'>}
          spids: [129]
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:TYPE_TEST_OUTPUT)
          op: assign_op.Equal
          rhs: {($ Id.VSub_DollarName '$DIR') <'/typeCheckedTests/actual_output'>}
          spids: [134]
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:TYPE_TEST_EXPECTED_OUTPUT)
          op: assign_op.Equal
          rhs: {($ Id.VSub_DollarName '$DIR') <'/typeCheckedTests/expected_output'>}
          spids: [139]
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:ERROR_TEST_INPUT)
          op: assign_op.Equal
          rhs: {($ Id.VSub_DollarName '$DIR') <'/errorTests/input'>}
          spids: [145]
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:ERROR_TEST_OUTPUT)
          op: assign_op.Equal
          rhs: {($ Id.VSub_DollarName '$DIR') <'/errorTests/actual_output'>}
          spids: [150]
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:ERROR_TEST_EXPECTED_OUTPUT)
          op: assign_op.Equal
          rhs: {($ Id.VSub_DollarName '$DIR') <'/errorTests/expected_output'>}
          spids: [155]
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:FAILED_TESTS)
          op: assign_op.Equal
          rhs: {($ Id.VSub_DollarName '$DIR') <'/failed_tests'>}
          spids: [161]
        )
      ]
    )
    (command.ShFunction
      name: info
      body: 
        (BraceGroup
          children: [
            (C {<printf>} 
              {
                (DQ (${ Id.VSub_Name INFO) ($ Id.VSub_Number '$1') (${ Id.VSub_Name RESET) 
                  <Id.Lit_BadBackslash '\\'> <n>
                )
              }
            )
          ]
        )
    )
    (command.ShFunction
      name: debug
      body: 
        (BraceGroup
          children: [
            (command.If
              arms: [
                (if_arm
                  cond: 
                    (condition.Shell
                      commands: [
                        (command.Sentence
                          child: 
                            (C {<Id.Lit_LBracket '['>} {<Id.KW_Bang '!'>} {<-z>} 
                              {(DQ ($ Id.VSub_DollarName '$VERBOSE'))} {<Id.Lit_RBracket ']'>}
                            )
                          terminator: <Id.Op_Semi _>
                        )
                      ]
                    )
                  action: [
                    (C {<printf>} 
                      {
                        (DQ (${ Id.VSub_Name DEBUG) ($ Id.VSub_Number '$1') (${ Id.VSub_Name RESET) 
                          <Id.Lit_BadBackslash '\\'> <n>
                        )
                      }
                    )
                  ]
                  spids: [201 216]
                )
              ]
            )
          ]
        )
    )
    (command.ShFunction
      name: success
      body: 
        (BraceGroup
          children: [
            (C {<printf>} 
              {
                (DQ (${ Id.VSub_Name SUCCESS) ($ Id.VSub_Number '$1') (${ Id.VSub_Name RESET) 
                  <Id.Lit_BadBackslash '\\'> <n>
                )
              }
            )
          ]
        )
    )
    (command.ShFunction
      name: output
      body: 
        (BraceGroup
          children: [(C {<printf>} {(DQ ($ Id.VSub_Number '$1') <Id.Lit_BadBackslash '\\'> <n>)})]
        )
    )
    (command.ShFunction
      name: warning
      body: 
        (BraceGroup
          children: [
            (C {<printf>} 
              {
                (DQ (${ Id.VSub_Name WARNING) ($ Id.VSub_Number '$1') (${ Id.VSub_Name RESET) 
                  <Id.Lit_BadBackslash '\\'> <n>
                )
              }
            )
          ]
        )
    )
    (command.ShFunction
      name: setup_test_dir
      body: 
        (BraceGroup
          children: [
            (C {<echo>} 
              {(DQ <'Setting up test dirs actual_output alongside the tests\' expected_output'>)}
            )
            (C {<mkdir>} {<-p>} {($ Id.VSub_DollarName '$UNIT_TEST_OUTPUT')} 
              {($ Id.VSub_DollarName '$TYPE_TEST_OUTPUT')} {($ Id.VSub_DollarName '$ERROR_TEST_OUTPUT')}
            )
            (C {<touch>} {($ Id.VSub_DollarName '$FAILED_TESTS')})
          ]
        )
    )
    (C {<setup_test_dir>})
    (C {<set>} {<Id.Lit_Other '+'> <e>})
    (command.ShFunction
      name: stdin_test
      body: 
        (BraceGroup
          children: [
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:INPUT_FILE)
                  op: assign_op.Equal
                  rhs: {($ Id.VSub_Number '$1')}
                  spids: [363]
                )
              ]
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:OUTPUT_FILE)
                  op: assign_op.Equal
                  rhs: {($ Id.VSub_Number '$2')}
                  spids: [367]
                )
              ]
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:EXPECTED_OUTPUT_FILE)
                  op: assign_op.Equal
                  rhs: {($ Id.VSub_Number '$3')}
                  spids: [371]
                )
              ]
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:HEURISTICS_FILE)
                  op: assign_op.Equal
                  rhs: {($ Id.VSub_Number '$4')}
                  spids: [379]
                )
              ]
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:FILENAME)
                  op: assign_op.Equal
                  rhs: 
                    {
                      (command_sub
                        left_token: <Id.Left_DollarParen '$('>
                        child: (C {<basename>} {($ Id.VSub_DollarName '$INPUT_FILE')})
                      )
                    }
                  spids: [384]
                )
              ]
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:FILEEXT)
                  op: assign_op.Equal
                  rhs: 
                    {
                      (DQ 
                        (braced_var_sub
                          token: <Id.VSub_Name FILENAME>
                          suffix_op: 
                            (suffix_op.Unary
                              tok: <Id.VOp1_DPound '##'>
                              arg_word: {<Id.Lit_Other '*'> <.>}
                            )
                        )
                      )
                    }
                  spids: [392]
                )
              ]
            )
            (command.If
              arms: [
                (if_arm
                  cond: 
                    (condition.Shell
                      commands: [
                        (command.Sentence
                          child: 
                            (command.DBracket
                              expr: 
                                (bool_expr.Binary
                                  op_id: Id.BoolBinary_GlobEqual
                                  left: {($ Id.VSub_DollarName '$FILEEXT')}
                                  right: {(DQ <re>)}
                                )
                            )
                          terminator: <Id.Op_Semi _>
                        )
                      ]
                    )
                  action: [
                    (command.Pipeline
                      children: [
                        (C {<cat>} {($ Id.VSub_DollarName '$INPUT_FILE')})
                        (command.Simple
                          words: [
                            {($ Id.VSub_DollarName '$REFMT')}
                            {<-is-interface-pp>}
                            {<false>}
                            {<-print-width>}
                            {<50>}
                            {<-parse>}
                            {<re>}
                            {<-print>}
                            {<re>}
                            {<-use-stdin>}
                            {<true>}
                          ]
                          redirects: [
                            (redir
                              op: <Id.Redir_GreatAnd '2>&'>
                              loc: (redir_loc.Fd fd:2)
                              arg: {<1>}
                            )
                            (redir
                              op: <Id.Redir_Great '>'>
                              loc: (redir_loc.Fd fd:1)
                              arg: {($ Id.VSub_DollarName '$OUTPUT_FILE')}
                            )
                          ]
                          do_fork: T
                        )
                      ]
                      negated: F
                    )
                  ]
                  spids: [404 419]
                )
                (if_arm
                  cond: 
                    (condition.Shell
                      commands: [
                        (command.Sentence
                          child: 
                            (command.DBracket
                              expr: 
                                (bool_expr.Binary
                                  op_id: Id.BoolBinary_GlobEqual
                                  left: {($ Id.VSub_DollarName '$FILEEXT')}
                                  right: {(DQ <rei>)}
                                )
                            )
                          terminator: <Id.Op_Semi _>
                        )
                      ]
                    )
                  action: [
                    (command.Pipeline
                      children: [
                        (C {<cat>} {($ Id.VSub_DollarName '$INPUT_FILE')})
                        (command.Simple
                          words: [
                            {($ Id.VSub_DollarName '$REFMT')}
                            {<-is-interface-pp>}
                            {<true>}
                            {<-print-width>}
                            {<50>}
                            {<-parse>}
                            {<re>}
                            {<-print>}
                            {<re>}
                            {<-use-stdin>}
                            {<true>}
                          ]
                          redirects: [
                            (redir
                              op: <Id.Redir_GreatAnd '2>&'>
                              loc: (redir_loc.Fd fd:2)
                              arg: {<1>}
                            )
                            (redir
                              op: <Id.Redir_Great '>'>
                              loc: (redir_loc.Fd fd:1)
                              arg: {($ Id.VSub_DollarName '$OUTPUT_FILE')}
                            )
                          ]
                          do_fork: T
                        )
                      ]
                      negated: F
                    )
                  ]
                  spids: [458 473]
                )
                (if_arm
                  cond: 
                    (condition.Shell
                      commands: [
                        (command.Sentence
                          child: 
                            (command.DBracket
                              expr: 
                                (bool_expr.Binary
                                  op_id: Id.BoolBinary_GlobEqual
                                  left: {($ Id.VSub_DollarName '$FILEEXT')}
                                  right: {(DQ <ml>)}
                                )
                            )
                          terminator: <Id.Op_Semi _>
                        )
                      ]
                    )
                  action: [
                    (command.Pipeline
                      children: [
                        (C {<cat>} {($ Id.VSub_DollarName '$INPUT_FILE')})
                        (command.Simple
                          words: [
                            {($ Id.VSub_DollarName '$REFMT')}
                            {<-heuristics-file>}
                            {($ Id.VSub_DollarName '$HEURISTICS_FILE')}
                            {<-is-interface-pp>}
                            {<false>}
                            {<-print-width>}
                            {<50>}
                            {<-parse>}
                            {<ml>}
                            {<-print>}
                            {<re>}
                            {<-use-stdin>}
                            {<true>}
                          ]
                          redirects: [
                            (redir
                              op: <Id.Redir_GreatAnd '2>&'>
                              loc: (redir_loc.Fd fd:2)
                              arg: {<1>}
                            )
                            (redir
                              op: <Id.Redir_Great '>'>
                              loc: (redir_loc.Fd fd:1)
                              arg: {($ Id.VSub_DollarName '$OUTPUT_FILE')}
                            )
                          ]
                          do_fork: T
                        )
                      ]
                      negated: F
                    )
                  ]
                  spids: [512 527]
                )
                (if_arm
                  cond: 
                    (condition.Shell
                      commands: [
                        (command.Sentence
                          child: 
                            (command.DBracket
                              expr: 
                                (bool_expr.Binary
                                  op_id: Id.BoolBinary_GlobEqual
                                  left: {($ Id.VSub_DollarName '$FILEEXT')}
                                  right: {(DQ <mli>)}
                                )
                            )
                          terminator: <Id.Op_Semi _>
                        )
                      ]
                    )
                  action: [
                    (command.Pipeline
                      children: [
                        (C {<cat>} {($ Id.VSub_DollarName '$INPUT_FILE')})
                        (command.Simple
                          words: [
                            {($ Id.VSub_DollarName '$REFMT')}
                            {<-heuristics-file>}
                            {($ Id.VSub_DollarName '$HEURISTICS_FILE')}
                            {<-is-interface-pp>}
                            {<true>}
                            {<-print-width>}
                            {<50>}
                            {<-parse>}
                            {<ml>}
                            {<-print>}
                            {<re>}
                            {<-use-stdin>}
                            {<true>}
                          ]
                          redirects: [
                            (redir
                              op: <Id.Redir_GreatAnd '2>&'>
                              loc: (redir_loc.Fd fd:2)
                              arg: {<1>}
                            )
                            (redir
                              op: <Id.Redir_Great '>'>
                              loc: (redir_loc.Fd fd:1)
                              arg: {($ Id.VSub_DollarName '$OUTPUT_FILE')}
                            )
                          ]
                          do_fork: T
                        )
                      ]
                      negated: F
                    )
                  ]
                  spids: [570 585]
                )
              ]
              else_action: [
                (C {<warning>} {(DQ <'  ⊘ FAILED -use-stdin '> <Id.Lit_BadBackslash '\\'> <n>)})
                (C {<info>} 
                  {
                    (DQ <'  Cannot determine default implementation parser for extension '> 
                      (${ Id.VSub_Name FILEEXT)
                    )
                  }
                )
                (command.ControlFlow
                  token: <Id.ControlFlow_Return return>
                  arg_word: {<1>}
                )
              ]
            )
            (command.If
              arms: [
                (if_arm
                  cond: 
                    (condition.Shell
                      commands: [
                        (command.Sentence
                          child: 
                            (command.Pipeline
                              children: [
                                (command.DBracket
                                  expr: 
                                    (bool_expr.Binary
                                      op_id: Id.BoolBinary_eq
                                      left: {($ Id.VSub_QMark '$?')}
                                      right: {<0>}
                                    )
                                )
                              ]
                              negated: T
                            )
                          terminator: <Id.Op_Semi _>
                        )
                      ]
                    )
                  action: [
                    (C {<warning>} {(DQ <'  ⊘ FAILED -use-stdin '> <Id.Lit_BadBackslash '\\'> <n>)})
                    (C {<info>} {(DQ <'  There was an error when testing -use-stdin'>)})
                    (C {<info>} {(DQ <'  for input file '> ($ Id.VSub_DollarName '$INPUT_FILE'))})
                    (C {<info>} 
                      {
                        (DQ <'  and output file '> ($ Id.VSub_DollarName '$OUTPUT_FILE') 
                          (${ Id.VSub_Name RESET)
                        )
                      }
                    )
                    (C {<echo>} {(DQ )})
                    (command.ControlFlow
                      token: <Id.ControlFlow_Return return>
                      arg_word: {<1>}
                    )
                  ]
                  spids: [659 674]
                )
              ]
            )
            (C {<debug>} 
              {
                (DQ <'  Comparing -use-stdin results:  diff '> ($ Id.VSub_DollarName '$OUTPUT_FILE') 
                  <' '> ($ Id.VSub_DollarName '$EXPECTED_OUTPUT_FILE')
                )
              }
            )
            (C {<diff>} {<--unchanged-line-format> <Id.Lit_Equals '='> (DQ )} 
              {<--new-line-format> <Id.Lit_Equals '='> (DQ <':%dn: %L'>)} {<--old-line-format> <Id.Lit_Equals '='> (DQ <':%dn: %L'>)} {($ Id.VSub_DollarName '$OUTPUT_FILE')} 
              {($ Id.VSub_DollarName '$EXPECTED_OUTPUT_FILE')}
            )
            (command.If
              arms: [
                (if_arm
                  cond: 
                    (condition.Shell
                      commands: [
                        (command.Sentence
                          child: 
                            (command.Pipeline
                              children: [
                                (command.DBracket
                                  expr: 
                                    (bool_expr.Binary
                                      op_id: Id.BoolBinary_eq
                                      left: {($ Id.VSub_QMark '$?')}
                                      right: {<0>}
                                    )
                                )
                              ]
                              negated: T
                            )
                          terminator: <Id.Op_Semi _>
                        )
                      ]
                    )
                  action: [
                    (C {<warning>} {(DQ <'  ⊘ FAILED -use-stdin '> <Id.Lit_BadBackslash '\\'> <n>)})
                    (C {<info>} 
                      {
                        (DQ <'  '> (${ Id.VSub_Name INFO) ($ Id.VSub_DollarName '$OUTPUT_FILE') 
                          (${ Id.VSub_Name RESET)
                        )
                      }
                    )
                    (C {<info>} {(DQ <'  doesn\'t match expected output'>)})
                    (C {<info>} 
                      {
                        (DQ <'  '> (${ Id.VSub_Name INFO) 
                          ($ Id.VSub_DollarName '$EXPECTED_OUTPUT_FILE') (${ Id.VSub_Name RESET)
                        )
                      }
                    )
                    (C {<echo>} {(DQ )})
                    (command.ControlFlow
                      token: <Id.ControlFlow_Return return>
                      arg_word: {<1>}
                    )
                  ]
                  spids: [762 777]
                )
              ]
            )
            (command.ControlFlow token:<Id.ControlFlow_Return return> arg_word:{<0>})
          ]
        )
    )
    (command.ShFunction
      name: unit_test
      body: 
        (BraceGroup
          children: [
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:FILE)
                  op: assign_op.Equal
                  rhs: {($ Id.VSub_Number '$1')}
                  spids: [854]
                )
              ]
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:INPUT)
                  op: assign_op.Equal
                  rhs: {($ Id.VSub_Number '$2')}
                  spids: [858]
                )
              ]
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:OUTPUT)
                  op: assign_op.Equal
                  rhs: {($ Id.VSub_Number '$3')}
                  spids: [862]
                )
              ]
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:EXPECTED_OUTPUT)
                  op: assign_op.Equal
                  rhs: {($ Id.VSub_Number '$4')}
                  spids: [866]
                )
              ]
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:FILENAME)
                  op: assign_op.Equal
                  rhs: 
                    {
                      (command_sub
                        left_token: <Id.Left_DollarParen '$('>
                        child: (C {<basename>} {($ Id.VSub_DollarName '$FILE')})
                      )
                    }
                  spids: [871]
                )
              ]
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:FILEEXT)
                  op: assign_op.Equal
                  rhs: 
                    {
                      (DQ 
                        (braced_var_sub
                          token: <Id.VSub_Name FILENAME>
                          suffix_op: 
                            (suffix_op.Unary
                              tok: <Id.VOp1_DPound '##'>
                              arg_word: {<Id.Lit_Other '*'> <.>}
                            )
                        )
                      )
                    }
                  spids: [879]
                )
              ]
            )
            (C {<info>} {(DQ <'Unit Test: '> ($ Id.VSub_DollarName '$FILE'))})
            (command.If
              arms: [
                (if_arm
                  cond: 
                    (condition.Shell
                      commands: [
                        (command.Sentence
                          child: 
                            (command.AndOr
                              ops: [Id.Op_DPipe]
                              children: [
                                (C {<Id.Lit_LBracket '['>} 
                                  {
                                    (DQ 
                                      (command_sub
                                        left_token: <Id.Left_DollarParen '$('>
                                        child: (C {<basename>} {($ Id.VSub_DollarName '$FILE')})
                                      )
                                    )
                                  } {<Id.KW_Bang '!'> <Id.Lit_Equals '='>} 
                                  {
                                    (DQ 
                                      (command_sub
                                        left_token: <Id.Left_DollarParen '$('>
                                        child: 
                                          (C {<basename>} {($ Id.VSub_DollarName '$FILE')} {<.ml>})
                                      )
                                    )
                                  } {<Id.Lit_RBracket ']'>}
                                )
                                (C {<Id.Lit_LBracket '['>} 
                                  {
                                    (DQ 
                                      (command_sub
                                        left_token: <Id.Left_DollarParen '$('>
                                        child: (C {<basename>} {($ Id.VSub_DollarName '$FILE')})
                                      )
                                    )
                                  } {<Id.KW_Bang '!'> <Id.Lit_Equals '='>} 
                                  {
                                    (DQ 
                                      (command_sub
                                        left_token: <Id.Left_DollarParen '$('>
                                        child: 
                                          (C {<basename>} {($ Id.VSub_DollarName '$FILE')} {<.mli>})
                                      )
                                    )
                                  } {<Id.Lit_RBracket ']'>}
                                )
                              ]
                            )
                          terminator: <Id.Op_Semi _>
                        )
                      ]
                    )
                  action: [
                    (command.If
                      arms: [
                        (if_arm
                          cond: 
                            (condition.Shell
                              commands: [
                                (command.Sentence
                                  child: 
                                    (C {<Id.Lit_LBracket '['>} 
                                      {
                                        (DQ 
                                          (command_sub
                                            left_token: <Id.Left_DollarParen '$('>
                                            child: (C {<basename>} {($ Id.VSub_DollarName '$FILE')})
                                          )
                                        )
                                      } {<Id.KW_Bang '!'> <Id.Lit_Equals '='>} 
                                      {
                                        (DQ 
                                          (command_sub
                                            left_token: <Id.Left_DollarParen '$('>
                                            child: 
                                              (C {<basename>} {($ Id.VSub_DollarName '$FILE')} {<.ml>})
                                          )
                                        )
                                      } {<Id.Lit_RBracket ']'>}
                                    )
                                  terminator: <Id.Op_Semi _>
                                )
                              ]
                            )
                          action: [
                            (command.ShAssignment
                              pairs: [
                                (assign_pair
                                  lhs: (sh_lhs_expr.Name name:REFILE)
                                  op: assign_op.Equal
                                  rhs: 
                                    {
                                      (DQ 
                                        (command_sub
                                          left_token: <Id.Left_DollarParen '$('>
                                          child: 
                                            (C {<basename>} {($ Id.VSub_DollarName '$FILE')} {<.ml>})
                                        ) <.re>
                                      )
                                    }
                                  spids: [988]
                                )
                              ]
                            )
                          ]
                          spids: [957 985]
                        )
                      ]
                      else_action: [
                        (command.ShAssignment
                          pairs: [
                            (assign_pair
                              lhs: (sh_lhs_expr.Name name:REFILE)
                              op: assign_op.Equal
                              rhs: 
                                {
                                  (DQ 
                                    (command_sub
                                      left_token: <Id.Left_DollarParen '$('>
                                      child: (C {<basename>} {($ Id.VSub_DollarName '$FILE')} {<.mli>})
                                    ) <.rei>
                                  )
                                }
                              spids: [1004]
                            )
                          ]
                        )
                      ]
                    )
                    (C {<debug>} 
                      {
                        (DQ ($ Id.VSub_DollarName '$REFMT') <' -heuristics-file '> 
                          ($ Id.VSub_DollarName '$INPUT') <'/arity.txt -print-width 50 -print re '> ($ Id.VSub_DollarName '$INPUT') <'/'> 
                          ($ Id.VSub_DollarName '$FILE') <' 2>&1 > '> ($ Id.VSub_DollarName '$OUTPUT') <'/'> ($ Id.VSub_DollarName '$REFILE')
                        )
                      }
                    )
                    (command.Simple
                      words: [
                        {($ Id.VSub_DollarName '$REFMT')}
                        {<-heuristics-file>}
                        {($ Id.VSub_DollarName '$INPUT') <'/arity.txt'>}
                        {<-print-width>}
                        {<50>}
                        {<-print>}
                        {<re>}
                        {($ Id.VSub_DollarName '$INPUT') <'/'> ($ Id.VSub_DollarName '$FILE')}
                      ]
                      redirects: [
                        (redir
                          op: <Id.Redir_GreatAnd '2>&'>
                          loc: (redir_loc.Fd fd:2)
                          arg: {<1>}
                        )
                        (redir
                          op: <Id.Redir_Great '>'>
                          loc: (redir_loc.Fd fd:1)
                          arg: 
                            {($ Id.VSub_DollarName '$OUTPUT') <'/'> ($ Id.VSub_DollarName '$REFILE')}
                        )
                      ]
                      do_fork: T
                    )
                    (command.If
                      arms: [
                        (if_arm
                          cond: 
                            (condition.Shell
                              commands: [
                                (command.Sentence
                                  child: 
                                    (command.Pipeline
                                      children: [
                                        (command.DBracket
                                          expr: 
                                            (bool_expr.Binary
                                              op_id: Id.BoolBinary_eq
                                              left: {($ Id.VSub_QMark '$?')}
                                              right: {<0>}
                                            )
                                        )
                                      ]
                                      negated: T
                                    )
                                  terminator: <Id.Op_Semi _>
                                )
                              ]
                            )
                          action: [
                            (C {<warning>} 
                              {
                                (DQ <'  ⊘ TEST FAILED CONVERTING ML TO RE'> 
                                  <Id.Lit_BadBackslash '\\'> <n>
                                )
                              }
                            )
                            (command.ControlFlow
                              token: <Id.ControlFlow_Return return>
                              arg_word: {<1>}
                            )
                          ]
                          spids: [1066 1081]
                        )
                      ]
                    )
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:FILE)
                          op: assign_op.Equal
                          rhs: {($ Id.VSub_DollarName '$REFILE')}
                          spids: [1101]
                        )
                      ]
                    )
                  ]
                  spids: [899 954]
                )
              ]
              else_action: [
                (C {<debug>} 
                  {
                    (DQ <'  \''> ($ Id.VSub_DollarName '$REFMT') <' -print-width 50 -print re '> 
                      ($ Id.VSub_DollarName '$INPUT') <'/'> ($ Id.VSub_DollarName '$FILE') <' 2>&1 > '> ($ Id.VSub_DollarName '$OUTPUT') <'/'> 
                      ($ Id.VSub_DollarName '$FILE') <'\''>
                    )
                  }
                )
                (command.Simple
                  words: [
                    {($ Id.VSub_DollarName '$REFMT')}
                    {<-print-width>}
                    {<50>}
                    {<-print>}
                    {<re>}
                    {($ Id.VSub_DollarName '$INPUT') <'/'> ($ Id.VSub_DollarName '$FILE')}
                  ]
                  redirects: [
                    (redir
                      op: <Id.Redir_GreatAnd '2>&'>
                      loc: (redir_loc.Fd fd:2)
                      arg: {<1>}
                    )
                    (redir
                      op: <Id.Redir_Great '>'>
                      loc: (redir_loc.Fd fd:1)
                      arg: {($ Id.VSub_DollarName '$OUTPUT') <'/'> ($ Id.VSub_DollarName '$FILE')}
                    )
                  ]
                  do_fork: T
                )
              ]
            )
            (C {<debug>} 
              {
                (DQ <'  Comparing results:  diff '> ($ Id.VSub_DollarName '$OUTPUT') <'/'> 
                  ($ Id.VSub_DollarName '$FILE') <' '> ($ Id.VSub_DollarName '$EXPECTED_OUTPUT') <'/'> ($ Id.VSub_DollarName '$FILE')
                )
              }
            )
            (C {<diff>} {<--unchanged-line-format> <Id.Lit_Equals '='> (DQ )} 
              {<--new-line-format> <Id.Lit_Equals '='> (DQ <':%dn: %L'>)} {<--old-line-format> <Id.Lit_Equals '='> (DQ <':%dn: %L'>)} 
              {($ Id.VSub_DollarName '$OUTPUT') <'/'> ($ Id.VSub_DollarName '$FILE')} {($ Id.VSub_DollarName '$EXPECTED_OUTPUT') <'/'> ($ Id.VSub_DollarName '$FILE')}
            )
            (command.If
              arms: [
                (if_arm
                  cond: 
                    (condition.Shell
                      commands: [
                        (command.Sentence
                          child: 
                            (command.Pipeline
                              children: [
                                (command.DBracket
                                  expr: 
                                    (bool_expr.Binary
                                      op_id: Id.BoolBinary_eq
                                      left: {($ Id.VSub_QMark '$?')}
                                      right: {<0>}
                                    )
                                )
                              ]
                              negated: T
                            )
                          terminator: <Id.Op_Semi _>
                        )
                      ]
                    )
                  action: [
                    (C {<warning>} {(DQ <'  ⊘ FAILED'> <Id.Lit_BadBackslash '\\'> <n>)})
                    (C {<info>} 
                      {
                        (DQ <'  '> (${ Id.VSub_Name INFO) ($ Id.VSub_DollarName '$OUTPUT') <'/'> 
                          ($ Id.VSub_DollarName '$FILE') (${ Id.VSub_Name RESET)
                        )
                      }
                    )
                    (C {<info>} {(DQ <'  doesn\'t match expected output'>)})
                    (C {<info>} 
                      {
                        (DQ <'  '> (${ Id.VSub_Name INFO) ($ Id.VSub_DollarName '$EXPECTED_OUTPUT') 
                          <'/'> ($ Id.VSub_DollarName '$FILE') (${ Id.VSub_Name RESET)
                        )
                      }
                    )
                    (C {<echo>} {(DQ )})
                    (command.ControlFlow
                      token: <Id.ControlFlow_Return return>
                      arg_word: {<1>}
                    )
                  ]
                  spids: [1197 1212]
                )
              ]
            )
            (C {<debug>} {(DQ <'Testing -use-stdin'>)})
            (C {<stdin_test>} {($ Id.VSub_DollarName '$INPUT') <'/'> ($ Id.VSub_Number '$1')} 
              {($ Id.VSub_DollarName '$OUTPUT') <'/'> ($ Id.VSub_DollarName '$FILE')} {($ Id.VSub_DollarName '$EXPECTED_OUTPUT') <'/'> ($ Id.VSub_DollarName '$FILE')} 
              {($ Id.VSub_DollarName '$INPUT') <'/arity.txt'>}
            )
            (command.If
              arms: [
                (if_arm
                  cond: 
                    (condition.Shell
                      commands: [
                        (command.Sentence
                          child: 
                            (command.Pipeline
                              children: [
                                (command.DBracket
                                  expr: 
                                    (bool_expr.Binary
                                      op_id: Id.BoolBinary_eq
                                      left: {($ Id.VSub_QMark '$?')}
                                      right: {<0>}
                                    )
                                )
                              ]
                              negated: T
                            )
                          terminator: <Id.Op_Semi _>
                        )
                      ]
                    )
                  action: [(command.ControlFlow token:<Id.ControlFlow_Return return> arg_word:{<1>})]
                  spids: [1304 1319]
                )
              ]
              else_action: [(C {<success>} {(DQ <'  ☑ PASS'>)}) (C {<echo>})]
            )
          ]
        )
    )
    (command.ShFunction
      name: idempotent_test
      body: 
        (BraceGroup
          children: [
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:FILE)
                  op: assign_op.Equal
                  rhs: {($ Id.VSub_Number '$1')}
                  spids: [1354]
                )
              ]
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:INPUT)
                  op: assign_op.Equal
                  rhs: {($ Id.VSub_Number '$2')}
                  spids: [1358]
                )
              ]
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:OUTPUT)
                  op: assign_op.Equal
                  rhs: {($ Id.VSub_Number '$3')}
                  spids: [1362]
                )
              ]
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:FILENAME)
                  op: assign_op.Equal
                  rhs: 
                    {
                      (command_sub
                        left_token: <Id.Left_DollarParen '$('>
                        child: (C {<basename>} {($ Id.VSub_DollarName '$FILE')})
                      )
                    }
                  spids: [1367]
                )
              ]
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:FILEEXT)
                  op: assign_op.Equal
                  rhs: 
                    {
                      (DQ 
                        (braced_var_sub
                          token: <Id.VSub_Name FILENAME>
                          suffix_op: 
                            (suffix_op.Unary
                              tok: <Id.VOp1_DPound '##'>
                              arg_word: {<Id.Lit_Other '*'> <.>}
                            )
                        )
                      )
                    }
                  spids: [1375]
                )
              ]
            )
            (C {<info>} {(DQ <'Idempotent Test: '> ($ Id.VSub_DollarName '$FILE'))})
            (command.If
              arms: [
                (if_arm
                  cond: 
                    (condition.Shell
                      commands: [
                        (command.Sentence
                          child: 
                            (command.AndOr
                              ops: [Id.Op_DPipe]
                              children: [
                                (C {<Id.Lit_LBracket '['>} 
                                  {
                                    (DQ 
                                      (command_sub
                                        left_token: <Id.Left_DollarParen '$('>
                                        child: (C {<basename>} {($ Id.VSub_DollarName '$FILE')})
                                      )
                                    )
                                  } {<Id.KW_Bang '!'> <Id.Lit_Equals '='>} 
                                  {
                                    (DQ 
                                      (command_sub
                                        left_token: <Id.Left_DollarParen '$('>
                                        child: 
                                          (C {<basename>} {($ Id.VSub_DollarName '$FILE')} {<.ml>})
                                      )
                                    )
                                  } {<Id.Lit_RBracket ']'>}
                                )
                                (C {<Id.Lit_LBracket '['>} 
                                  {
                                    (DQ 
                                      (command_sub
                                        left_token: <Id.Left_DollarParen '$('>
                                        child: (C {<basename>} {($ Id.VSub_DollarName '$FILE')})
                                      )
                                    )
                                  } {<Id.KW_Bang '!'> <Id.Lit_Equals '='>} 
                                  {
                                    (DQ 
                                      (command_sub
                                        left_token: <Id.Left_DollarParen '$('>
                                        child: 
                                          (C {<basename>} {($ Id.VSub_DollarName '$FILE')} {<.mli>})
                                      )
                                    )
                                  } {<Id.Lit_RBracket ']'>}
                                )
                              ]
                            )
                          terminator: <Id.Op_Semi _>
                        )
                      ]
                    )
                  action: [
                    (command.If
                      arms: [
                        (if_arm
                          cond: 
                            (condition.Shell
                              commands: [
                                (command.Sentence
                                  child: 
                                    (C {<Id.Lit_LBracket '['>} 
                                      {
                                        (DQ 
                                          (command_sub
                                            left_token: <Id.Left_DollarParen '$('>
                                            child: (C {<basename>} {($ Id.VSub_DollarName '$FILE')})
                                          )
                                        )
                                      } {<Id.KW_Bang '!'> <Id.Lit_Equals '='>} 
                                      {
                                        (DQ 
                                          (command_sub
                                            left_token: <Id.Left_DollarParen '$('>
                                            child: 
                                              (C {<basename>} {($ Id.VSub_DollarName '$FILE')} {<.ml>})
                                          )
                                        )
                                      } {<Id.Lit_RBracket ']'>}
                                    )
                                  terminator: <Id.Op_Semi _>
                                )
                              ]
                            )
                          action: [
                            (command.ShAssignment
                              pairs: [
                                (assign_pair
                                  lhs: (sh_lhs_expr.Name name:REFILE)
                                  op: assign_op.Equal
                                  rhs: 
                                    {
                                      (DQ 
                                        (command_sub
                                          left_token: <Id.Left_DollarParen '$('>
                                          child: 
                                            (C {<basename>} {($ Id.VSub_DollarName '$FILE')} {<.ml>})
                                        ) <.re>
                                      )
                                    }
                                  spids: [1484]
                                )
                              ]
                            )
                          ]
                          spids: [1453 1481]
                        )
                      ]
                      else_action: [
                        (command.ShAssignment
                          pairs: [
                            (assign_pair
                              lhs: (sh_lhs_expr.Name name:REFILE)
                              op: assign_op.Equal
                              rhs: 
                                {
                                  (DQ 
                                    (command_sub
                                      left_token: <Id.Left_DollarParen '$('>
                                      child: (C {<basename>} {($ Id.VSub_DollarName '$FILE')} {<.mli>})
                                    ) <.rei>
                                  )
                                }
                              spids: [1500]
                            )
                          ]
                        )
                      ]
                    )
                    (C {<debug>} 
                      {
                        (DQ <'  Converting '> ($ Id.VSub_DollarName '$FILE') <' to '> 
                          ($ Id.VSub_DollarName '$REFILE') <':'>
                        )
                      }
                    )
                    (C {<debug>} 
                      {
                        (DQ <'  Formatting Once: '> ($ Id.VSub_DollarName '$REFMT') 
                          <' -heuristics-file '> ($ Id.VSub_DollarName '$INPUT') <'/arity.txt -print-width 50 -print re '> 
                          ($ Id.VSub_DollarName '$INPUT') <'/'> ($ Id.VSub_DollarName '$FILE') <' 2>&1 > '> ($ Id.VSub_DollarName '$OUTPUT') <'/'> 
                          ($ Id.VSub_DollarName '$REFILE')
                        )
                      }
                    )
                    (command.Simple
                      words: [
                        {($ Id.VSub_DollarName '$REFMT')}
                        {<-heuristics-file>}
                        {($ Id.VSub_DollarName '$INPUT') <'/arity.txt'>}
                        {<-print-width>}
                        {<50>}
                        {<-print>}
                        {<re>}
                        {($ Id.VSub_DollarName '$INPUT') <'/'> ($ Id.VSub_DollarName '$FILE')}
                      ]
                      redirects: [
                        (redir
                          op: <Id.Redir_GreatAnd '2>&'>
                          loc: (redir_loc.Fd fd:2)
                          arg: {<1>}
                        )
                        (redir
                          op: <Id.Redir_Great '>'>
                          loc: (redir_loc.Fd fd:1)
                          arg: 
                            {($ Id.VSub_DollarName '$OUTPUT') <'/'> ($ Id.VSub_DollarName '$REFILE')}
                        )
                      ]
                      do_fork: T
                    )
                    (command.If
                      arms: [
                        (if_arm
                          cond: 
                            (condition.Shell
                              commands: [
                                (command.Sentence
                                  child: 
                                    (command.Pipeline
                                      children: [
                                        (command.DBracket
                                          expr: 
                                            (bool_expr.Binary
                                              op_id: Id.BoolBinary_eq
                                              left: {($ Id.VSub_QMark '$?')}
                                              right: {<0>}
                                            )
                                        )
                                      ]
                                      negated: T
                                    )
                                  terminator: <Id.Op_Semi _>
                                )
                              ]
                            )
                          action: [
                            (C {<warning>} {(DQ <'⊘ FAILED'> <Id.Lit_BadBackslash '\\'> <n>)})
                            (command.ControlFlow
                              token: <Id.ControlFlow_Return return>
                              arg_word: {<1>}
                            )
                          ]
                          spids: [1575 1590]
                        )
                      ]
                    )
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:FILE)
                          op: assign_op.Equal
                          rhs: {($ Id.VSub_DollarName '$REFILE')}
                          spids: [1610]
                        )
                      ]
                    )
                    (C {<debug>} 
                      {
                        (DQ <'  Generating output again: '> ($ Id.VSub_DollarName '$REFMT') 
                          <' -print-width 50 -print re '> ($ Id.VSub_DollarName '$OUTPUT') <'/'> ($ Id.VSub_DollarName '$FILE') <' 2>&1 > '> 
                          ($ Id.VSub_DollarName '$OUTPUT') <'/'> ($ Id.VSub_DollarName '$FILE') <.formatted>
                        )
                      }
                    )
                    (command.Simple
                      words: [
                        {($ Id.VSub_DollarName '$REFMT')}
                        {<-print-width>}
                        {<50>}
                        {<-print>}
                        {<re>}
                        {($ Id.VSub_DollarName '$OUTPUT') <'/'> ($ Id.VSub_DollarName '$FILE')}
                      ]
                      redirects: [
                        (redir
                          op: <Id.Redir_GreatAnd '2>&'>
                          loc: (redir_loc.Fd fd:2)
                          arg: {<1>}
                        )
                        (redir
                          op: <Id.Redir_Great '>'>
                          loc: (redir_loc.Fd fd:1)
                          arg: 
                            {($ Id.VSub_DollarName '$OUTPUT') <'/'> ($ Id.VSub_DollarName '$FILE') 
                              <.formatted>
                            }
                        )
                      ]
                      do_fork: T
                    )
                  ]
                  spids: [1395 1450]
                )
              ]
              else_action: [
                (C {<debug>} 
                  {
                    (DQ <'  Formatting Once: \''> ($ Id.VSub_DollarName '$REFMT') 
                      <' -print-width 50 -print re '> ($ Id.VSub_DollarName '$INPUT') <'/'> ($ Id.VSub_DollarName '$FILE') <' 2>&1 > '> 
                      ($ Id.VSub_DollarName '$OUTPUT') <'/'> ($ Id.VSub_DollarName '$FILE') <'\''>
                    )
                  }
                )
                (command.Simple
                  words: [
                    {($ Id.VSub_DollarName '$REFMT')}
                    {<-print-width>}
                    {<50>}
                    {<-print>}
                    {<re>}
                    {($ Id.VSub_DollarName '$INPUT') <'/'> ($ Id.VSub_DollarName '$FILE')}
                  ]
                  redirects: [
                    (redir
                      op: <Id.Redir_GreatAnd '2>&'>
                      loc: (redir_loc.Fd fd:2)
                      arg: {<1>}
                    )
                    (redir
                      op: <Id.Redir_Great '>'>
                      loc: (redir_loc.Fd fd:1)
                      arg: {($ Id.VSub_DollarName '$OUTPUT') <'/'> ($ Id.VSub_DollarName '$FILE')}
                    )
                  ]
                  do_fork: T
                )
                (C {<debug>} 
                  {
                    (DQ <'  Generating output again: '> ($ Id.VSub_DollarName '$REFMT') 
                      <' -print-width 50 -print re '> ($ Id.VSub_DollarName '$OUTPUT') <'/'> ($ Id.VSub_DollarName '$FILE') <' 2>&1 > '> 
                      ($ Id.VSub_DollarName '$OUTPUT') <'/'> ($ Id.VSub_DollarName '$FILE') <.formatted>
                    )
                  }
                )
                (command.Simple
                  words: [
                    {($ Id.VSub_DollarName '$REFMT')}
                    {<-print-width>}
                    {<50>}
                    {<-print>}
                    {<re>}
                    {($ Id.VSub_DollarName '$OUTPUT') <'/'> ($ Id.VSub_DollarName '$FILE')}
                  ]
                  redirects: [
                    (redir
                      op: <Id.Redir_GreatAnd '2>&'>
                      loc: (redir_loc.Fd fd:2)
                      arg: {<1>}
                    )
                    (redir
                      op: <Id.Redir_Great '>'>
                      loc: (redir_loc.Fd fd:1)
                      arg: 
                        {($ Id.VSub_DollarName '$OUTPUT') <'/'> ($ Id.VSub_DollarName '$FILE') 
                          <.formatted>
                        }
                    )
                  ]
                  do_fork: T
                )
              ]
            )
            (C {<diff>} {<--unchanged-line-format> <Id.Lit_Equals '='> (DQ )} 
              {<--new-line-format> <Id.Lit_Equals '='> (DQ <':%dn: %L'>)} {<--old-line-format> <Id.Lit_Equals '='> (DQ <':%dn: %L'>)} 
              {($ Id.VSub_DollarName '$OUTPUT') <'/'> ($ Id.VSub_DollarName '$FILE')} {($ Id.VSub_DollarName '$OUTPUT') <'/'> ($ Id.VSub_DollarName '$FILE') <.formatted>}
            )
            (command.If
              arms: [
                (if_arm
                  cond: 
                    (condition.Shell
                      commands: [
                        (command.Sentence
                          child: 
                            (command.Pipeline
                              children: [
                                (command.DBracket
                                  expr: 
                                    (bool_expr.Binary
                                      op_id: Id.BoolBinary_eq
                                      left: {($ Id.VSub_QMark '$?')}
                                      right: {<0>}
                                    )
                                )
                              ]
                              negated: T
                            )
                          terminator: <Id.Op_Semi _>
                        )
                      ]
                    )
                  action: [
                    (C {<warning>} {(DQ <'⊘ FAILED'> <Id.Lit_BadBackslash '\\'> <n>)})
                    (C {<info>} 
                      {
                        (DQ <'  '> (${ Id.VSub_Name INFO) ($ Id.VSub_DollarName '$OUTPUT') <'/'> 
                          ($ Id.VSub_DollarName '$FILE') <.formatted> (${ Id.VSub_Name RESET) <Id.Lit_BadBackslash '\\'> <n>
                        )
                      }
                    )
                    (C {<info>} {(DQ <'  is not same as'>)})
                    (C {<info>} 
                      {
                        (DQ <'  '> (${ Id.VSub_Name INFO) ($ Id.VSub_DollarName '$OUTPUT') <'/'> 
                          ($ Id.VSub_DollarName '$FILE') (${ Id.VSub_Name RESET)
                        )
                      }
                    )
                    (command.ControlFlow
                      token: <Id.ControlFlow_Return return>
                      arg_word: {<1>}
                    )
                  ]
                  spids: [1776 1791]
                )
              ]
            )
            (C {<debug>} {(DQ <'Testing -use-stdin'>)})
            (C {<stdin_test>} {($ Id.VSub_DollarName '$INPUT') <'/'> ($ Id.VSub_Number '$1')} 
              {($ Id.VSub_DollarName '$OUTPUT') <'/'> ($ Id.VSub_DollarName '$FILE')} {($ Id.VSub_DollarName '$OUTPUT') <'/'> ($ Id.VSub_DollarName '$FILE')} 
              {($ Id.VSub_DollarName '$INPUT') <'/arity.txt'>}
            )
            (command.If
              arms: [
                (if_arm
                  cond: 
                    (condition.Shell
                      commands: [
                        (command.Sentence
                          child: 
                            (command.Pipeline
                              children: [
                                (command.DBracket
                                  expr: 
                                    (bool_expr.Binary
                                      op_id: Id.BoolBinary_eq
                                      left: {($ Id.VSub_QMark '$?')}
                                      right: {<0>}
                                    )
                                )
                              ]
                              negated: T
                            )
                          terminator: <Id.Op_Semi _>
                        )
                      ]
                    )
                  action: [(command.ControlFlow token:<Id.ControlFlow_Return return> arg_word:{<1>})]
                  spids: [1880 1895]
                )
              ]
              else_action: [
                (C {<stdin_test>} 
                  {($ Id.VSub_DollarName '$OUTPUT') <'/'> ($ Id.VSub_DollarName '$FILE')} {($ Id.VSub_DollarName '$OUTPUT') <'/'> ($ Id.VSub_DollarName '$FILE') <.formatted>} 
                  {($ Id.VSub_DollarName '$OUTPUT') <'/'> ($ Id.VSub_DollarName '$FILE')} {($ Id.VSub_DollarName '$INPUT') <'/arity.txt'>}
                )
                (command.If
                  arms: [
                    (if_arm
                      cond: 
                        (condition.Shell
                          commands: [
                            (command.Sentence
                              child: 
                                (command.Pipeline
                                  children: [
                                    (command.DBracket
                                      expr: 
                                        (bool_expr.Binary
                                          op_id: Id.BoolBinary_eq
                                          left: {($ Id.VSub_QMark '$?')}
                                          right: {<0>}
                                        )
                                    )
                                  ]
                                  negated: T
                                )
                              terminator: <Id.Op_Semi _>
                            )
                          ]
                        )
                      action: [
                        (command.ControlFlow
                          token: <Id.ControlFlow_Return return>
                          arg_word: {<1>}
                        )
                      ]
                      spids: [1925 1940]
                    )
                  ]
                  else_action: [(C {<success>} {(DQ <'  ☑ PASS'>)}) (C {<echo>})]
                )
              ]
            )
          ]
        )
    )
    (command.ShFunction
      name: typecheck_test
      body: 
        (BraceGroup
          children: [
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:FILE)
                  op: assign_op.Equal
                  rhs: {($ Id.VSub_Number '$1')}
                  spids: [1978]
                )
              ]
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:INPUT)
                  op: assign_op.Equal
                  rhs: {($ Id.VSub_Number '$2')}
                  spids: [1982]
                )
              ]
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:OUTPUT)
                  op: assign_op.Equal
                  rhs: {($ Id.VSub_Number '$3')}
                  spids: [1986]
                )
              ]
            )
            (C {<info>} {(DQ <'Typecheck Test: '> ($ Id.VSub_DollarName '$FILE'))})
            (command.If
              arms: [
                (if_arm
                  cond: 
                    (condition.Shell
                      commands: [
                        (command.Sentence
                          child: 
                            (command.AndOr
                              ops: [Id.Op_DPipe]
                              children: [
                                (C {<Id.Lit_LBracket '['>} 
                                  {
                                    (DQ 
                                      (command_sub
                                        left_token: <Id.Left_DollarParen '$('>
                                        child: (C {<basename>} {($ Id.VSub_DollarName '$FILE')})
                                      )
                                    )
                                  } {<Id.KW_Bang '!'> <Id.Lit_Equals '='>} 
                                  {
                                    (DQ 
                                      (command_sub
                                        left_token: <Id.Left_DollarParen '$('>
                                        child: 
                                          (C {<basename>} {($ Id.VSub_DollarName '$FILE')} {<.ml>})
                                      )
                                    )
                                  } {<Id.Lit_RBracket ']'>}
                                )
                                (C {<Id.Lit_LBracket '['>} 
                                  {
                                    (DQ 
                                      (command_sub
                                        left_token: <Id.Left_DollarParen '$('>
                                        child: (C {<basename>} {($ Id.VSub_DollarName '$FILE')})
                                      )
                                    )
                                  } {<Id.KW_Bang '!'> <Id.Lit_Equals '='>} 
                                  {
                                    (DQ 
                                      (command_sub
                                        left_token: <Id.Left_DollarParen '$('>
                                        child: 
                                          (C {<basename>} {($ Id.VSub_DollarName '$FILE')} {<.mli>})
                                      )
                                    )
                                  } {<Id.Lit_RBracket ']'>}
                                )
                              ]
                            )
                          terminator: <Id.Op_Semi _>
                        )
                      ]
                    )
                  action: [
                    (command.If
                      arms: [
                        (if_arm
                          cond: 
                            (condition.Shell
                              commands: [
                                (command.Sentence
                                  child: 
                                    (C {<Id.Lit_LBracket '['>} 
                                      {
                                        (DQ 
                                          (command_sub
                                            left_token: <Id.Left_DollarParen '$('>
                                            child: (C {<basename>} {($ Id.VSub_DollarName '$FILE')})
                                          )
                                        )
                                      } {<Id.KW_Bang '!'> <Id.Lit_Equals '='>} 
                                      {
                                        (DQ 
                                          (command_sub
                                            left_token: <Id.Left_DollarParen '$('>
                                            child: 
                                              (C {<basename>} {($ Id.VSub_DollarName '$FILE')} {<.ml>})
                                          )
                                        )
                                      } {<Id.Lit_RBracket ']'>}
                                    )
                                  terminator: <Id.Op_Semi _>
                                )
                              ]
                            )
                          action: [
                            (command.ShAssignment
                              pairs: [
                                (assign_pair
                                  lhs: (sh_lhs_expr.Name name:REFILE)
                                  op: assign_op.Equal
                                  rhs: 
                                    {
                                      (DQ 
                                        (command_sub
                                          left_token: <Id.Left_DollarParen '$('>
                                          child: 
                                            (C {<basename>} {($ Id.VSub_DollarName '$FILE')} {<.ml>})
                                        ) <.re>
                                      )
                                    }
                                  spids: [2088]
                                )
                              ]
                            )
                          ]
                          spids: [2057 2085]
                        )
                      ]
                      else_action: [
                        (command.ShAssignment
                          pairs: [
                            (assign_pair
                              lhs: (sh_lhs_expr.Name name:REFILE)
                              op: assign_op.Equal
                              rhs: 
                                {
                                  (DQ 
                                    (command_sub
                                      left_token: <Id.Left_DollarParen '$('>
                                      child: (C {<basename>} {($ Id.VSub_DollarName '$FILE')} {<.mli>})
                                    ) <.rei>
                                  )
                                }
                              spids: [2104]
                            )
                          ]
                        )
                      ]
                    )
                    (C {<debug>} 
                      {
                        (DQ <'  Converting '> ($ Id.VSub_DollarName '$FILE') <' to '> 
                          ($ Id.VSub_DollarName '$REFILE') <':'>
                        )
                      }
                    )
                    (C {<debug>} 
                      {
                        (DQ ($ Id.VSub_DollarName '$REFMT') <' -heuristics-file '> 
                          ($ Id.VSub_DollarName '$INPUT') <'/arity.txt -print-width 50 -print re '> ($ Id.VSub_DollarName '$INPUT') <'/'> 
                          ($ Id.VSub_DollarName '$FILE') <' 2>&1 > '> ($ Id.VSub_DollarName '$OUTPUT') <'/'> ($ Id.VSub_DollarName '$REFILE')
                        )
                      }
                    )
                    (command.Simple
                      words: [
                        {($ Id.VSub_DollarName '$REFMT')}
                        {<-heuristics-file>}
                        {($ Id.VSub_DollarName '$INPUT') <'/arity.txt'>}
                        {<-print-width>}
                        {<50>}
                        {<-print>}
                        {<re>}
                        {($ Id.VSub_DollarName '$INPUT') <'/'> ($ Id.VSub_DollarName '$FILE')}
                      ]
                      redirects: [
                        (redir
                          op: <Id.Redir_GreatAnd '2>&'>
                          loc: (redir_loc.Fd fd:2)
                          arg: {<1>}
                        )
                        (redir
                          op: <Id.Redir_Great '>'>
                          loc: (redir_loc.Fd fd:1)
                          arg: 
                            {($ Id.VSub_DollarName '$OUTPUT') <'/'> ($ Id.VSub_DollarName '$REFILE')}
                        )
                      ]
                      do_fork: T
                    )
                    (command.If
                      arms: [
                        (if_arm
                          cond: 
                            (condition.Shell
                              commands: [
                                (command.Sentence
                                  child: 
                                    (command.Pipeline
                                      children: [
                                        (command.DBracket
                                          expr: 
                                            (bool_expr.Binary
                                              op_id: Id.BoolBinary_eq
                                              left: {($ Id.VSub_QMark '$?')}
                                              right: {<0>}
                                            )
                                        )
                                      ]
                                      negated: T
                                    )
                                  terminator: <Id.Op_Semi _>
                                )
                              ]
                            )
                          action: [
                            (C {<warning>} {(DQ <'  ⊘ FAILED'> <Id.Lit_BadBackslash '\\'> <n>)})
                            (command.ControlFlow
                              token: <Id.ControlFlow_Return return>
                              arg_word: {<1>}
                            )
                          ]
                          spids: [2177 2192]
                        )
                      ]
                    )
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:FILE)
                          op: assign_op.Equal
                          rhs: {($ Id.VSub_DollarName '$REFILE')}
                          spids: [2212]
                        )
                      ]
                    )
                  ]
                  spids: [1999 2054]
                )
              ]
              else_action: [
                (C {<debug>} 
                  {
                    (DQ <'  Formatting: '> ($ Id.VSub_DollarName '$REFMT') 
                      <' -print-width 50 -print re '> ($ Id.VSub_DollarName '$INPUT') <'/'> ($ Id.VSub_DollarName '$FILE') <' 2>&1 > '> 
                      ($ Id.VSub_DollarName '$OUTPUT') <'/'> ($ Id.VSub_DollarName '$FILE')
                    )
                  }
                )
                (command.Simple
                  words: [
                    {($ Id.VSub_DollarName '$REFMT')}
                    {<-print-width>}
                    {<50>}
                    {<-print>}
                    {<re>}
                    {($ Id.VSub_DollarName '$INPUT') <'/'> ($ Id.VSub_DollarName '$FILE')}
                  ]
                  redirects: [
                    (redir
                      op: <Id.Redir_GreatAnd '2>&'>
                      loc: (redir_loc.Fd fd:2)
                      arg: {<1>}
                    )
                    (redir
                      op: <Id.Redir_Great '>'>
                      loc: (redir_loc.Fd fd:1)
                      arg: {($ Id.VSub_DollarName '$OUTPUT') <'/'> ($ Id.VSub_DollarName '$FILE')}
                    )
                  ]
                  do_fork: T
                )
                (command.If
                  arms: [
                    (if_arm
                      cond: 
                        (condition.Shell
                          commands: [
                            (command.Sentence
                              child: 
                                (command.Pipeline
                                  children: [
                                    (command.DBracket
                                      expr: 
                                        (bool_expr.Binary
                                          op_id: Id.BoolBinary_eq
                                          left: {($ Id.VSub_QMark '$?')}
                                          right: {<0>}
                                        )
                                    )
                                  ]
                                  negated: T
                                )
                              terminator: <Id.Op_Semi _>
                            )
                          ]
                        )
                      action: [
                        (C {<warning>} {(DQ <'  ⊘ FAILED'> <Id.Lit_BadBackslash '\\'> <n>)})
                        (command.ControlFlow
                          token: <Id.ControlFlow_Return return>
                          arg_word: {<1>}
                        )
                      ]
                      spids: [2259 2274]
                    )
                  ]
                )
              ]
            )
            (command.If
              arms: [
                (if_arm
                  cond: 
                    (condition.Shell
                      commands: [
                        (command.Sentence
                          child: 
                            (C {<Id.Lit_LBracket '['>} 
                              {
                                (DQ 
                                  (command_sub
                                    left_token: <Id.Left_DollarParen '$('>
                                    child: (C {<basename>} {($ Id.VSub_DollarName '$FILE')})
                                  )
                                )
                              } {<Id.KW_Bang '!'> <Id.Lit_Equals '='>} 
                              {
                                (DQ 
                                  (command_sub
                                    left_token: <Id.Left_DollarParen '$('>
                                    child: (C {<basename>} {($ Id.VSub_DollarName '$FILE')} {<.re>})
                                  )
                                )
                              } {<Id.Lit_RBracket ']'>}
                            )
                          terminator: <Id.Op_Semi _>
                        )
                      ]
                    )
                  action: [
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:COMPILE_FLAGS)
                          op: assign_op.Equal
                          rhs: {(DQ <'-intf-suffix .rei -impl'>)}
                          spids: [2328]
                        )
                      ]
                    )
                  ]
                  spids: [2297 2325]
                )
              ]
              else_action: [
                (command.ShAssignment
                  pairs: [
                    (assign_pair
                      lhs: (sh_lhs_expr.Name name:COMPILE_FLAGS)
                      op: assign_op.Equal
                      rhs: {(DQ <-intf>)}
                      spids: [2337]
                    )
                  ]
                )
              ]
            )
            (C {<debug>} 
              {
                (DQ <'  Compiling: ocamlc -c -pp '> ($ Id.VSub_DollarName '$REFMT') <' '> 
                  ($ Id.VSub_DollarName '$COMPILE_FLAGS') <' '> ($ Id.VSub_DollarName '$OUTPUT') <'/'> ($ Id.VSub_DollarName '$FILE')
                )
              }
            )
            (C {<ocamlc>} {<-c>} {<-pp>} {($ Id.VSub_DollarName '$REFMT')} 
              {($ Id.VSub_DollarName '$COMPILE_FLAGS')} {(DQ ($ Id.VSub_DollarName '$OUTPUT') <'/'> ($ Id.VSub_DollarName '$FILE'))}
            )
            (command.If
              arms: [
                (if_arm
                  cond: 
                    (condition.Shell
                      commands: [
                        (command.Sentence
                          child: 
                            (command.Pipeline
                              children: [
                                (command.DBracket
                                  expr: 
                                    (bool_expr.Binary
                                      op_id: Id.BoolBinary_eq
                                      left: {($ Id.VSub_QMark '$?')}
                                      right: {<0>}
                                    )
                                )
                              ]
                              negated: T
                            )
                          terminator: <Id.Op_Semi _>
                        )
                      ]
                    )
                  action: [
                    (C {<warning>} {(DQ <'  ⊘ FAILED'> <Id.Lit_BadBackslash '\\'> <n>)})
                    (command.ControlFlow
                      token: <Id.ControlFlow_Return return>
                      arg_word: {<1>}
                    )
                  ]
                  spids: [2378 2393]
                )
              ]
            )
            (C {<success>} {(DQ <'  ☑ PASS'>)})
            (C {<echo>})
          ]
        )
    )
    (command.ShFunction
      name: error_test
      body: 
        (BraceGroup
          children: [
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:FILE)
                  op: assign_op.Equal
                  rhs: {($ Id.VSub_Number '$1')}
                  spids: [2435]
                )
              ]
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:INPUT)
                  op: assign_op.Equal
                  rhs: {($ Id.VSub_Number '$2')}
                  spids: [2439]
                )
              ]
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:OUTPUT)
                  op: assign_op.Equal
                  rhs: {($ Id.VSub_Number '$3')}
                  spids: [2443]
                )
              ]
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:EXPECTED_OUTPUT)
                  op: assign_op.Equal
                  rhs: {($ Id.VSub_Number '$4')}
                  spids: [2447]
                )
              ]
            )
            (C {<info>} {(DQ <'Error Test: '> ($ Id.VSub_DollarName '$FILE'))})
            (command.If
              arms: [
                (if_arm
                  cond: 
                    (condition.Shell
                      commands: [
                        (command.Sentence
                          child: 
                            (command.AndOr
                              ops: [Id.Op_DPipe]
                              children: [
                                (C {<Id.Lit_LBracket '['>} 
                                  {
                                    (DQ 
                                      (command_sub
                                        left_token: <Id.Left_DollarParen '$('>
                                        child: (C {<basename>} {($ Id.VSub_DollarName '$FILE')})
                                      )
                                    )
                                  } {<Id.KW_Bang '!'> <Id.Lit_Equals '='>} 
                                  {
                                    (DQ 
                                      (command_sub
                                        left_token: <Id.Left_DollarParen '$('>
                                        child: 
                                          (C {<basename>} {($ Id.VSub_DollarName '$FILE')} {<.ml>})
                                      )
                                    )
                                  } {<Id.Lit_RBracket ']'>}
                                )
                                (C {<Id.Lit_LBracket '['>} 
                                  {
                                    (DQ 
                                      (command_sub
                                        left_token: <Id.Left_DollarParen '$('>
                                        child: (C {<basename>} {($ Id.VSub_DollarName '$FILE')})
                                      )
                                    )
                                  } {<Id.KW_Bang '!'> <Id.Lit_Equals '='>} 
                                  {
                                    (DQ 
                                      (command_sub
                                        left_token: <Id.Left_DollarParen '$('>
                                        child: 
                                          (C {<basename>} {($ Id.VSub_DollarName '$FILE')} {<.mli>})
                                      )
                                    )
                                  } {<Id.Lit_RBracket ']'>}
                                )
                              ]
                            )
                          terminator: <Id.Op_Semi _>
                        )
                      ]
                    )
                  action: [
                    (C {<warning>} 
                      {
                        (DQ 
                          <
'  ⊘ FAILED: .ml files should not need to be run against error tests. '
                          > <Id.Lit_BadBackslash '\\'> <n>
                        )
                      }
                    )
                    (command.ControlFlow
                      token: <Id.ControlFlow_Return return>
                      arg_word: {<1>}
                    )
                  ]
                  spids: [2460 2515]
                )
              ]
              else_action: [
                (C {<debug>} 
                  {
                    (DQ <'  \''> ($ Id.VSub_DollarName '$REFMT') <' -print-width 50 -print re '> 
                      ($ Id.VSub_DollarName '$INPUT') <'/'> ($ Id.VSub_DollarName '$FILE') <' &> '> ($ Id.VSub_DollarName '$OUTPUT') <'/'> 
                      ($ Id.VSub_DollarName '$FILE') <'\''>
                    )
                  }
                )
                (C {<cd>} {($ Id.VSub_DollarName '$INPUT')})
                (command.Simple
                  words: [
                    {($ Id.VSub_DollarName '$REFMT')}
                    {<-print-width>}
                    {<50>}
                    {<-print>}
                    {<re>}
                    {
                      (command_sub
                        left_token: <Id.Left_DollarParen '$('>
                        child: (C {<basename>} {($ Id.VSub_DollarName '$FILE')})
                      )
                    }
                  ]
                  redirects: [
                    (redir
                      op: <Id.Redir_AndGreat '&>'>
                      loc: (redir_loc.Fd fd:1)
                      arg: {($ Id.VSub_DollarName '$OUTPUT') <'/'> ($ Id.VSub_DollarName '$FILE')}
                    )
                  ]
                  do_fork: T
                )
                (command.Simple
                  words: [{<cd>} {<->}]
                  redirects: [
                    (redir
                      op: <Id.Redir_Great '>'>
                      loc: (redir_loc.Fd fd:1)
                      arg: {<'/dev/null'>}
                    )
                  ]
                  do_fork: T
                )
              ]
            )
            (C {<debug>} 
              {
                (DQ <'  Comparing results:  diff '> ($ Id.VSub_DollarName '$OUTPUT') <'/'> 
                  ($ Id.VSub_DollarName '$FILE') <' '> ($ Id.VSub_DollarName '$EXPECTED_OUTPUT') <'/'> ($ Id.VSub_DollarName '$FILE')
                )
              }
            )
            (C {<diff>} {<--unchanged-line-format> <Id.Lit_Equals '='> (DQ )} 
              {<--new-line-format> <Id.Lit_Equals '='> (DQ <':%dn: %L'>)} {<--old-line-format> <Id.Lit_Equals '='> (DQ <':%dn: %L'>)} 
              {($ Id.VSub_DollarName '$OUTPUT') <'/'> ($ Id.VSub_DollarName '$FILE')} {($ Id.VSub_DollarName '$EXPECTED_OUTPUT') <'/'> ($ Id.VSub_DollarName '$FILE')}
            )
            (command.If
              arms: [
                (if_arm
                  cond: 
                    (condition.Shell
                      commands: [
                        (command.Sentence
                          child: 
                            (command.Pipeline
                              children: [
                                (command.DBracket
                                  expr: 
                                    (bool_expr.Binary
                                      op_id: Id.BoolBinary_eq
                                      left: {($ Id.VSub_QMark '$?')}
                                      right: {<0>}
                                    )
                                )
                              ]
                              negated: T
                            )
                          terminator: <Id.Op_Semi _>
                        )
                      ]
                    )
                  action: [
                    (C {<warning>} {(DQ <'  ⊘ FAILED'> <Id.Lit_BadBackslash '\\'> <n>)})
                    (C {<info>} 
                      {
                        (DQ <'  '> (${ Id.VSub_Name INFO) ($ Id.VSub_DollarName '$OUTPUT') <'/'> 
                          ($ Id.VSub_DollarName '$FILE') (${ Id.VSub_Name RESET)
                        )
                      }
                    )
                    (C {<info>} {(DQ <'  doesn\'t match expected output'>)})
                    (C {<info>} 
                      {
                        (DQ <'  '> (${ Id.VSub_Name INFO) ($ Id.VSub_DollarName '$EXPECTED_OUTPUT') 
                          <'/'> ($ Id.VSub_DollarName '$FILE') (${ Id.VSub_Name RESET)
                        )
                      }
                    )
                    (C {<echo>} {(DQ )})
                    (command.ControlFlow
                      token: <Id.ControlFlow_Return return>
                      arg_word: {<1>}
                    )
                  ]
                  spids: [2641 2656]
                )
              ]
            )
            (C {<success>} {(DQ <'  ☑ PASS'>)})
            (C {<echo>})
          ]
        )
    )
    (command.AndOr
      ops: [Id.Op_DAmp]
      children: [
        (C {<cd>} {($ Id.VSub_DollarName '$UNIT_TEST_INPUT')})
        (command.Pipeline
          children: [
            (C {<find>} {<.>} {<-type>} {<f>} {(word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\('>)} 
              {<-name>} {(DQ <'*.re*'>)} {<-or>} {<-name>} {(DQ <'*.ml*'>)} 
              {(word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\)'>)}
            )
            (command.WhileUntil
              keyword: <Id.KW_While while>
              cond: 
                (condition.Shell
                  commands: [(command.Sentence child:(C {<read>} {<file>}) terminator:<Id.Op_Semi _>)]
                )
              body: 
                (command.DoGroup
                  children: [
                    (C {<unit_test>} {($ Id.VSub_DollarName '$file')} 
                      {($ Id.VSub_DollarName '$UNIT_TEST_INPUT')} {($ Id.VSub_DollarName '$UNIT_TEST_OUTPUT')} {($ Id.VSub_DollarName '$UNIT_TEST_EXPECTED_OUTPUT')}
                    )
                    (command.If
                      arms: [
                        (if_arm
                          cond: 
                            (condition.Shell
                              commands: [
                                (command.Sentence
                                  child: 
                                    (command.Pipeline
                                      children: [
                                        (command.DBracket
                                          expr: 
                                            (bool_expr.Binary
                                              op_id: Id.BoolBinary_eq
                                              left: {($ Id.VSub_QMark '$?')}
                                              right: {<0>}
                                            )
                                        )
                                      ]
                                      negated: T
                                    )
                                  terminator: <Id.Op_Semi _>
                                )
                              ]
                            )
                          action: [
                            (command.Simple
                              words: [
                                {<echo>}
                                {(DQ ($ Id.VSub_DollarName '$file') <' -- failed unit_test'>)}
                              ]
                              redirects: [
                                (redir
                                  op: <Id.Redir_DGreat '>>'>
                                  loc: (redir_loc.Fd fd:1)
                                  arg: {($ Id.VSub_DollarName '$FAILED_TESTS')}
                                )
                              ]
                              do_fork: T
                            )
                          ]
                          spids: [2789 2804]
                        )
                      ]
                    )
                    (C {<idempotent_test>} {($ Id.VSub_DollarName '$file')} 
                      {($ Id.VSub_DollarName '$UNIT_TEST_INPUT')} {($ Id.VSub_DollarName '$UNIT_TEST_OUTPUT')} {($ Id.VSub_DollarName '$UNIT_TEST_EXPECTED_OUTPUT')}
                    )
                    (command.If
                      arms: [
                        (if_arm
                          cond: 
                            (condition.Shell
                              commands: [
                                (command.Sentence
                                  child: 
                                    (command.Pipeline
                                      children: [
                                        (command.DBracket
                                          expr: 
                                            (bool_expr.Binary
                                              op_id: Id.BoolBinary_eq
                                              left: {($ Id.VSub_QMark '$?')}
                                              right: {<0>}
                                            )
                                        )
                                      ]
                                      negated: T
                                    )
                                  terminator: <Id.Op_Semi _>
                                )
                              ]
                            )
                          action: [
                            (command.Simple
                              words: [
                                {<echo>}
                                {(DQ ($ Id.VSub_DollarName '$file') <' -- failed idempotent_test'>)}
                              ]
                              redirects: [
                                (redir
                                  op: <Id.Redir_DGreat '>>'>
                                  loc: (redir_loc.Fd fd:1)
                                  arg: {($ Id.VSub_DollarName '$FAILED_TESTS')}
                                )
                              ]
                              do_fork: T
                            )
                          ]
                          spids: [2834 2849]
                        )
                      ]
                    )
                  ]
                )
            )
          ]
          negated: F
        )
      ]
    )
    (command.AndOr
      ops: [Id.Op_DAmp]
      children: [
        (C {<cd>} {($ Id.VSub_DollarName '$TYPE_TEST_INPUT')})
        (command.Pipeline
          children: [
            (C {<find>} {<.>} {<-type>} {<f>} {(word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\('>)} 
              {<-name>} {(DQ <'*.re*'>)} {<-or>} {<-name>} {(DQ <'*.ml*'>)} 
              {(word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\)'>)}
            )
            (C {<sort>})
            (command.WhileUntil
              keyword: <Id.KW_While while>
              cond: 
                (condition.Shell
                  commands: [(command.Sentence child:(C {<read>} {<file>}) terminator:<Id.Op_Semi _>)]
                )
              body: 
                (command.DoGroup
                  children: [
                    (C {<typecheck_test>} {($ Id.VSub_DollarName '$file')} 
                      {($ Id.VSub_DollarName '$TYPE_TEST_INPUT')} {($ Id.VSub_DollarName '$TYPE_TEST_OUTPUT')}
                    )
                    (command.If
                      arms: [
                        (if_arm
                          cond: 
                            (condition.Shell
                              commands: [
                                (command.Sentence
                                  child: 
                                    (command.Pipeline
                                      children: [
                                        (command.DBracket
                                          expr: 
                                            (bool_expr.Binary
                                              op_id: Id.BoolBinary_eq
                                              left: {($ Id.VSub_QMark '$?')}
                                              right: {<0>}
                                            )
                                        )
                                      ]
                                      negated: T
                                    )
                                  terminator: <Id.Op_Semi _>
                                )
                              ]
                            )
                          action: [
                            (command.Simple
                              words: [
                                {<echo>}
                                {(DQ ($ Id.VSub_DollarName '$file') <' -- failed typecheck_test'>)}
                              ]
                              redirects: [
                                (redir
                                  op: <Id.Redir_DGreat '>>'>
                                  loc: (redir_loc.Fd fd:1)
                                  arg: {($ Id.VSub_DollarName '$FAILED_TESTS')}
                                )
                              ]
                              do_fork: T
                            )
                          ]
                          spids: [2926 2941]
                        )
                      ]
                    )
                    (C {<unit_test>} {($ Id.VSub_DollarName '$file')} 
                      {($ Id.VSub_DollarName '$TYPE_TEST_INPUT')} {($ Id.VSub_DollarName '$TYPE_TEST_OUTPUT')} {($ Id.VSub_DollarName '$TYPE_TEST_EXPECTED_OUTPUT')}
                    )
                    (command.If
                      arms: [
                        (if_arm
                          cond: 
                            (condition.Shell
                              commands: [
                                (command.Sentence
                                  child: 
                                    (command.Pipeline
                                      children: [
                                        (command.DBracket
                                          expr: 
                                            (bool_expr.Binary
                                              op_id: Id.BoolBinary_eq
                                              left: {($ Id.VSub_QMark '$?')}
                                              right: {<0>}
                                            )
                                        )
                                      ]
                                      negated: T
                                    )
                                  terminator: <Id.Op_Semi _>
                                )
                              ]
                            )
                          action: [
                            (command.Simple
                              words: [
                                {<echo>}
                                {(DQ ($ Id.VSub_DollarName '$file') <' -- failed unit_test'>)}
                              ]
                              redirects: [
                                (redir
                                  op: <Id.Redir_DGreat '>>'>
                                  loc: (redir_loc.Fd fd:1)
                                  arg: {($ Id.VSub_DollarName '$FAILED_TESTS')}
                                )
                              ]
                              do_fork: T
                            )
                          ]
                          spids: [2970 2985]
                        )
                      ]
                    )
                    (C {<idempotent_test>} {($ Id.VSub_DollarName '$file')} 
                      {($ Id.VSub_DollarName '$TYPE_TEST_INPUT')} {($ Id.VSub_DollarName '$TYPE_TEST_OUTPUT')} {($ Id.VSub_DollarName '$TYPE_TEST_EXPECTED_OUTPUT')}
                    )
                    (command.If
                      arms: [
                        (if_arm
                          cond: 
                            (condition.Shell
                              commands: [
                                (command.Sentence
                                  child: 
                                    (command.Pipeline
                                      children: [
                                        (command.DBracket
                                          expr: 
                                            (bool_expr.Binary
                                              op_id: Id.BoolBinary_eq
                                              left: {($ Id.VSub_QMark '$?')}
                                              right: {<0>}
                                            )
                                        )
                                      ]
                                      negated: T
                                    )
                                  terminator: <Id.Op_Semi _>
                                )
                              ]
                            )
                          action: [
                            (command.Simple
                              words: [
                                {<echo>}
                                {(DQ ($ Id.VSub_DollarName '$file') <' -- failed idempotent_test'>)}
                              ]
                              redirects: [
                                (redir
                                  op: <Id.Redir_DGreat '>>'>
                                  loc: (redir_loc.Fd fd:1)
                                  arg: {($ Id.VSub_DollarName '$FAILED_TESTS')}
                                )
                              ]
                              do_fork: T
                            )
                          ]
                          spids: [3014 3029]
                        )
                      ]
                    )
                  ]
                )
            )
          ]
          negated: F
        )
      ]
    )
    (command.AndOr
      ops: [Id.Op_DAmp]
      children: [
        (C {<cd>} {($ Id.VSub_DollarName '$ERROR_TEST_INPUT')})
        (command.Pipeline
          children: [
            (C {<find>} {<.>} {<-type>} {<f>} {(word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\('>)} 
              {<-name>} {(DQ <'*.re*'>)} {<-or>} {<-name>} {(DQ <'*.ml*'>)} 
              {(word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\)'>)}
            )
            (command.WhileUntil
              keyword: <Id.KW_While while>
              cond: 
                (condition.Shell
                  commands: [(command.Sentence child:(C {<read>} {<file>}) terminator:<Id.Op_Semi _>)]
                )
              body: 
                (command.DoGroup
                  children: [
                    (C {<error_test>} {($ Id.VSub_DollarName '$file')} 
                      {($ Id.VSub_DollarName '$ERROR_TEST_INPUT')} {($ Id.VSub_DollarName '$ERROR_TEST_OUTPUT')} {($ Id.VSub_DollarName '$ERROR_TEST_EXPECTED_OUTPUT')}
                    )
                    (command.If
                      arms: [
                        (if_arm
                          cond: 
                            (condition.Shell
                              commands: [
                                (command.Sentence
                                  child: 
                                    (command.Pipeline
                                      children: [
                                        (command.DBracket
                                          expr: 
                                            (bool_expr.Binary
                                              op_id: Id.BoolBinary_eq
                                              left: {($ Id.VSub_QMark '$?')}
                                              right: {<0>}
                                            )
                                        )
                                      ]
                                      negated: T
                                    )
                                  terminator: <Id.Op_Semi _>
                                )
                              ]
                            )
                          action: [
                            (command.Simple
                              words: [
                                {<echo>}
                                {(DQ ($ Id.VSub_DollarName '$file') <' -- failed error_test'>)}
                              ]
                              redirects: [
                                (redir
                                  op: <Id.Redir_DGreat '>>'>
                                  loc: (redir_loc.Fd fd:1)
                                  arg: {($ Id.VSub_DollarName '$FAILED_TESTS')}
                                )
                              ]
                              do_fork: T
                            )
                          ]
                          spids: [3104 3119]
                        )
                      ]
                    )
                  ]
                )
            )
          ]
          negated: F
        )
      ]
    )
    (command.If
      arms: [
        (if_arm
          cond: 
            (condition.Shell
              commands: [
                (command.Sentence
                  child: 
                    (command.DBracket
                      expr: 
                        (bool_expr.Unary
                          op_id: Id.BoolUnary_s
                          child: {($ Id.VSub_DollarName '$FAILED_TESTS')}
                        )
                    )
                  terminator: <Id.Op_Semi _>
                )
              ]
            )
          action: [
            (C {<warning>} {(DQ <'Failed tests:'>)})
            (C {<cat>} {($ Id.VSub_DollarName '$FAILED_TESTS')})
            (command.ControlFlow token:<Id.ControlFlow_Exit exit> arg_word:{<1>})
          ]
          spids: [3139 3150]
        )
      ]
    )
    (command.ControlFlow token:<Id.ControlFlow_Exit exit> arg_word:{<0>})
  ]
)