[TEST] Fix Feature Flags in Test Framework and SortTemplates yaml failure (#82)

This commit adds parse logic to correctly parse feature flags in the test framework. It also fixes a test failure in cat.templates/Sort Templates yaml test.

Signed-off-by: Peter Nied <petern@amazon.com>
This commit is contained in:
Nick Knize 2021-02-10 14:17:43 -06:00 committed by Peter Nied
parent fc3922aee4
commit b360d4fb61
2 changed files with 15 additions and 5 deletions

View File

@ -230,8 +230,8 @@
- match:
$body: |
/^
test \s+ \[t\*\] \s+ \n \n
test_1 \s+ \[te\*\] \s+ 1 \n \n
test \s+ \[t\*\] \s+ \n
test_1 \s+ \[te\*\] \s+ 1 \n
$/
- do:
@ -242,8 +242,8 @@
- match:
$body: |
/^
test_1 \s+ \[te\*\] \s+ 1\n \n
test \s+ \[t\*\] \s+ \n \n
test_1 \s+ \[te\*\] \s+ 1\n
test \s+ \[t\*\] \s+ \n
$/

View File

@ -71,7 +71,17 @@ public class SkipSection {
} else if ("reason".equals(currentFieldName)) {
reason = parser.text();
} else if ("features".equals(currentFieldName)) {
features.add(parser.text());
String f = parser.text();
// split on ','
String[] fs = f.split(",");
if (fs != null) {
// add each feature, separately:
for (String feature : fs) {
features.add(feature.trim());
}
} else {
features.add(f);
}
}
else {
throw new ParsingException(parser.getTokenLocation(),