mirror of
https://github.com/hneemann/Digital.git
synced 2025-09-26 06:22:48 -04:00
allow tabs to separate signal names in test case header
This commit is contained in:
parent
8f0a481023
commit
9755e42d75
@ -288,6 +288,7 @@ public class Tokenizer {
|
||||
return Token.IDENT;
|
||||
} else
|
||||
return Token.EOL;
|
||||
case '\t':
|
||||
case ' ':
|
||||
if (builder.length() > 0) {
|
||||
return Token.IDENT;
|
||||
|
@ -137,6 +137,18 @@ public class ParserTest extends TestCase {
|
||||
assertEquals(1, td.getLines().size());
|
||||
}
|
||||
|
||||
public void testHeaderTabs() throws TestingDataException, IOException, ParserException {
|
||||
Parser parser = new Parser("A\tB\tC \t D\n1\t1\t1\t1").parse();
|
||||
LineCollector td = new LineCollector(parser);
|
||||
assertEquals(4, td.getNames().size());
|
||||
assertEquals("A", td.getNames().get(0));
|
||||
assertEquals("B", td.getNames().get(1));
|
||||
assertEquals("C", td.getNames().get(2));
|
||||
assertEquals("D", td.getNames().get(3));
|
||||
assertEquals(1, td.getLines().size());
|
||||
assertEquals(4, td.getLines().get(0).length);
|
||||
}
|
||||
|
||||
public void testEmptyLines() throws TestingDataException, IOException, ParserException {
|
||||
Parser parser = new Parser("A_i B_i C_i-1 C_i S_i\n" +
|
||||
" 0 0 0 0 0\n" +
|
||||
|
Loading…
x
Reference in New Issue
Block a user