Repository navigation
Commit 63f7735
committed
test: Pin the 512-character let identifier cap on the v1 path
openjd-model 0.6.0 carries openjd-rs#358, which enforces Template Schemas
§3.6.1's 512-character cap on a `let` binding's `<UserIdentifier>`; before it a
513-character name was accepted. The v0 side has covered this since #348, in
`test/openjd/model_v0/v2023_09/test_let_bindings.py`. The v1 path had nothing, so
the bump brought the enforcement with no test on this side to hold it.
Measured through `decode_job_template` on both implementations before writing the
assertions. 512 characters is accepted and 513 rejected, identically, with `EXPR`
alone and with `EXPR` plus `FEATURE_BUNDLE_1`.
The accept at 512 with `EXPR` alone is the case worth having. The cap is flat,
not §7.1's `<Identifier>` cap of 64 rising to 512 under `FEATURE_BUNDLE_1`, so a
fix built on the wrong constant would reject a template the spec permits. A
65-character control covers the same ground from the other side: over the §7.1
cap, under §3.6.1's, and accepted.
The two implementations' messages differ in wording, so the assertion is on the
error path and the phrase `exceeds 512 characters`, not on the whole string.
Verified: 5572 passed, 24 skipped, 3 xfailed with the 94% coverage gate; ruff,
black and mypy clean.
Signed-off-by: David Leong <116610336+leongdl@users.noreply.github.com>1 parent e27a4fb commit 63f7735
1 file changed
Lines changed: 63 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
232 | 232 | | |
233 | 233 | | |
234 | 234 | | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
235 | 298 | | |
236 | 299 | | |
237 | 300 | | |
| |||
0 commit comments