Package com.github.sommeri.less4j.utils.w3ctestsextractor.common

Examples of com.github.sommeri.less4j.utils.w3ctestsextractor.common.SimpleFileReader


    throw new IllegalStateException(kind);
  }

  private void buildTestCases() {
    SimpleFileReader reader = new SimpleFileReader(getCurrentDirectory() + INPUT_FILE);
    reader.skipHeaderIncluding("<tbody>");
    String blockStart = reader.readLine();
    while ("<tr class=\"fail\">".equals(blockStart)) {
      reader.assertLine("<td>Fail</td>");
      String nameLine = reader.readLine();
      String name = nameLine.substring(4, nameLine.length() - 5);
      String testLine = reader.readLine();
      String test = testLine.substring(22, testLine.length() - " Reached unreachable code</td>".length());
      String testKind = test.substring(0, test.indexOf(':'));
      String testCase = test.substring(test.indexOf('"') + 1, test.length() - 1);
      addTestCase(name, testKind, testCase);
      reader.assertLine("</tr>");
      blockStart = reader.readLine();
    }
  }
View Full Code Here

TOP

Related Classes of com.github.sommeri.less4j.utils.w3ctestsextractor.common.SimpleFileReader

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.