docs: public void run(ExpectState state) throws Exception {
          int flags = 0; // TCL.NAMESPACE_ONLY
  
          // TODO Inject expect object, so that expect wrapper can access it
          // clear previous expect_out
          //interp.unsetVar("expect_out", flags);
  
          String buffer = state.getBuffer();
          logger.trace("Setting var expect_out(buffer) to " + buffer);
          interp.setVar("expect_out", "buffer", buffer, flags);
  
          int group = 0;
          while(true) {
              String match = state.getMatch(group);
              String index = group + ",string";
              group++;
              if( match == null )
                  break;
              logger.trace("Setting var expect_out(" + index +") to " + match);
              interp.setVar("expect_out", index , match, flags);
          }
  
          ExpectEmulation.setExpContinue(interp, false);
  
          if( tclCode != null && tclCode.toString().length() > 0 ) {
              logger.debug("Running a tcl bit of code: " + tclCode.toString());
  
              try {
                  interp.eval(tclCode, 0);
              } catch(TclException e) {
                  logger.warn("Exception: " + e);
                  throw new Exception( interp.getResult().toString(), e);
              }
              if( ExpectEmulation.isExpContinue(interp) ) {
                  logger.info("Asked to continue");
                  state.exp_continue();
              }
          }
          //interp.unsetVar("expect_out", flags);
  
      }