ExecPty implements Pty { static Size doGetHPUXSize(String cfg) { String[] tokens = cfg.split(";"); return new Size(Integer.parseInt(tokens[4].substring(9)), Integer.parseInt(tokens[2].substring(7))); } protected  ExecPty(String name); static Pty current(); @Override void close(); String getName(); @Override InputStream getMasterInput(); @Override OutputStream getMasterOutput(); @Override InputStream getSlaveInput(); @Override OutputStream getSlaveOutput(); @Override Attributes getAttr(); @Override void setAttr(Attributes attr); @Override Size getSize();  }
@Test public void testParseSizeHPUX() throws IOException { if(Config.isOSPOSIXCompatible()) { String input = new String(Files.readAllBytes( Config.isOSPOSIXCompatible() ? new File("src/test/resources/ttytype_hpux.txt").toPath() : new File("src\\test\\resources\\ttytype_hpux.txt").toPath())); Size size = ExecPty.doGetHPUXSize(input); assertEquals(47, size.getHeight()); assertEquals(112, size.getWidth()); } }