craigwblake/redline — pull request #6 by khmarbaise (2012-04-19 20:21:52+00:00)
Title: Added simple test class to use real generated RPM's

Currently the second test (not really a test only a usage of the Scanner class):

@Test
public void scanSomeArchTest() throws Exception {
Scanner.main ( new String[]{ getTestResourcesDirectory ( ) + File.separator + "rpm-3-1.0-1.somearch.rpm" } );
}
does not work and fails with:

FAILED: scanSomeArchTest
java.lang.IllegalStateException: Expected 16 remaining, found '14'.
at org.freecompany.redline.header.Lead.read(Lead.java:79)
at org.freecompany.redline.Scanner.run(Scanner.java:68)
at org.freecompany.redline.Scanner.main(Scanner.java:40)
at org.freecompany.redline.ScannerTest.scanSomeArchTest(ScannerTest.java:17)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:80)
at org.testng.internal.Invoker.invokeMethod(Invoker.java:691)
at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:883)
at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1208)
at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:127)
at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:111)
at org.testng.TestRunner.privateRun(TestRunner.java:758)
at org.testng.TestRunner.run(TestRunner.java:613)
at org.testng.SuiteRunner.runTest(SuiteRunner.java:334)
at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:329)