SoarTclInterface implements SoarCommandInterpreter { public synchronized String eval(String command) throws SoarException { command = command.replaceAll("\r\n", "\n"); command = command.replaceAll("\r", "\n"); try { interp.eval(command); return interp.getResult().toString(); } catch (TclException e) { throw new TclInterpreterException(interp.getResult().toString()); } } private  SoarTclInterface(Agent agent); static SoarTclInterface find(Agent agent); static SoarTclInterface findOrCreate(Agent agent); static void dispose(SoarTclInterface ifc); SoarCommandContext getContext(); @Override String getName(); void dispose(); @Override Collection<String> getSourcedFiles(); Agent getAgent(); SoarExceptionsManager getTclContext(); void source(File file); void source(URL url); @Override void loadRete(File file); @Override void loadRete(URL url); @Override void saveRete(File file); @Override String getWorkingDirectory(); synchronized String eval(String command); @Override void addCommand(String name, SoarCommand handler); @Override SoarCommand getCommand(String name, SourceLocation srcLoc); @Override String[] getCompletionList(String command, int cursorPosition); @Override ParsedCommand getParsedCommand(String name, SourceLocation srcLoc); @Override List<String> getCommandStrings(); @Override SoarExceptionsManager getExceptionsManager();  }
@Test public void testEnvironmentVariablesAreAvailable() throws Exception { final String path = ifc.eval("global env; set env(PATH)"); assertEquals(System.getenv("PATH"), path); }