| 1 | # Test key validation and transformation |
| 2 | pattern: "(?P<valid_key>\\w+)\\s+(?P<invalid_key>\\w+)\\s+(?P<message>.*)" |
| 3 | |
| 4 | inject: |
| 5 | # Test long key (should warn) |
| 6 | - key: THIS_IS_A_VERY_LONG_KEY_NAME_THAT_EXCEEDS_SIXTY_FOUR_CHARACTERS_LIMIT |
| 7 | value: "long key test" |
| 8 | |
| 9 | # Test key with invalid characters (should be converted) |
| 10 | - key: key-with-dashes |
| 11 | value: "dashes" |
| 12 | |
| 13 | - key: key.with.dots |
| 14 | value: "dots" |
| 15 | |
| 16 | - key: key@with#special$chars |
| 17 | value: "special" |
| 18 | |
| 19 | # Test key starting with digit (should warn) |
| 20 | - key: 123_STARTS_WITH_DIGIT |
| 21 | value: "digit start" |
| 22 | |
| 23 | # Test key starting with underscore (should warn) |
| 24 | - key: _UNDERSCORE_START |
| 25 | value: "underscore start" |
| 26 | |
| 27 | # Test valid key |
| 28 | - key: VALID_KEY_NAME |
| 29 | value: "valid" |
| 30 | |
| 31 | # Expected transformations: |
| 32 | # - invalid-key -> INVALID_KEY (dashes to underscores, lowercase to uppercase) |
| 33 | # - Long keys should generate warnings but still work |
| 34 | # - Invalid chars should be converted to underscores |
| 35 | # - Keys starting with digits or underscores should generate warnings |