void () { final ParseResult result = PyNewStyleStringFormatParser.parse("'{:{:{:{}}}} {}'"); final List<Field> topLevelFields = result.getFields(); UsefulTestCase.assertSize(2, topLevelFields); UsefulTestCase.assertSize(5, result.getAllFields()); assertOrderedEquals(result.getAllFields().stream().map(Field::getDepth).toArray(), 1, 2, 3, 4, 1); assertOrderedEquals(result.getAllFields().stream().map(SubstitutionChunk::getAutoPosition).toArray(), 0, 1, 2, 3, 4); }