(command.CommandList
  children: [
    (command.ShFunction
      name: check
      body: 
        (BraceGroup
          children: [
            (command.If
              arms: [
                (if_arm
                  cond: 
                    (condition.Shell
                      commands: [
                        (command.Pipeline
                          children: [
                            (C {<grep>} {<-q>} {(DQ ($ Id.VSub_Number '$2'))} 
                              {(DQ ($ Id.VSub_Number '$1'))}
                            )
                          ]
                          negated: T
                        )
                      ]
                    )
                  action: [
                    (C {<echo>} 
                      {(DQ <'Did not find expected output in '> ($ Id.VSub_Number '$1') <':'>)}
                    )
                    (C {<echo>} {(DQ <'   '> ($ Id.VSub_Number '$2'))})
                    (C {<echo>} {(DQ )})
                    (C {<echo>} {(DQ <'Actual output below:'>)})
                    (C {<cat>} {(DQ ($ Id.VSub_Number '$1'))})
                    (command.ControlFlow
                      token: <Id.ControlFlow_Exit exit>
                      arg_word: {<1>}
                    )
                  ]
                  spids: [65 82]
                )
              ]
            )
          ]
        )
    )
    (command.ShFunction
      name: check_not
      body: 
        (BraceGroup
          children: [
            (command.If
              arms: [
                (if_arm
                  cond: 
                    (condition.Shell
                      commands: [
                        (C {<grep>} {<-q>} {(DQ ($ Id.VSub_Number '$2'))} {(DQ ($ Id.VSub_Number '$1'))})
                      ]
                    )
                  action: [
                    (C {<echo>} {(DQ <'Found unexpected output in '> ($ Id.VSub_Number '$1') <':'>)})
                    (C {<echo>} {(DQ <'   '> ($ Id.VSub_Number '$2'))})
                    (C {<echo>} {(DQ )})
                    (C {<echo>} {(DQ <'Actual output below:'>)})
                    (C {<cat>} {(DQ ($ Id.VSub_Number '$1'))})
                    (command.ControlFlow
                      token: <Id.ControlFlow_Exit exit>
                      arg_word: {<1>}
                    )
                  ]
                  spids: [139 154]
                )
              ]
            )
          ]
        )
    )
    (C {<check>} {<plugin_test_7.err>} {(DQ <'set_x: PREVAILING_DEF_IRONLY'>)})
    (C {<check>} {<plugin_test_7.err>} {(DQ <'fun2: RESOLVED_EXEC'>)})
    (C {<check>} {<plugin_test_7.err>} {(DQ <'fun1: PREVAILING_DEF_REG'>)})
    (C {<check>} {<plugin_test_7.err>} 
      {(DQ <'removing unused section from \'.text.fun2\' in file \'plugin_test_7_2.o\''>)}
    )
    (C {<check_not>} {<plugin_test_7.syms>} {(DQ <fun2>)})
  ]
)