Commit 234522bf
234522bfc1cdMerged
Sam Ruby <[email protected]> · 5 months ago · 2 files · ~2 modified
Description
Address PR review: simplify terminator, harden seed-test grep
- class_qualified_name: replace the convoluted ternary terminator with
if (cap) out[j] = '\0'. The loop only advances j while j + 1 < cap, so j < cap on exit; the cap == 0 case no longer writes out[0]. - rbs-seed-test: make the generated-C assertions whitespace-tolerant
(ERE allowing optional spaces around
*) so a harmless codegen formatting change can't cause a false negative.
Co-Authored-By: Claude Opus 4.8 (1M context) [email protected]
Details
- Commit
- 234522bfc1cd
- Parent
- 13491db23d03
MakefilemodifiedView file
@@ -342,8 +342,8 @@
342342
$(SPINEL) test/rbs-seed/nested_ivar.rb --rbs test/rbs-seed/sig \343343
-c --no-line-map -o "$$tmp/out.c" 2>/dev/null; \344344
ok=1; \345-
grep -q 'const char \* iv_label' "$$tmp/out.c" || ok=0; \346-
if grep -q 'sp_RbVal iv_label' "$$tmp/out.c"; then ok=0; fi; \345+
grep -Eq 'const char[[:space:]]+\*[[:space:]]*iv_label' "$$tmp/out.c" || ok=0; \346+
if grep -Eq 'sp_RbVal[[:space:]]+iv_label' "$$tmp/out.c"; then ok=0; fi; \347347
$(CC) -fsyntax-only -Ilib "$$tmp/out.c" 2>/dev/null || ok=0; \348348
rm -rf "$$tmp"; \349349
if [ $$ok -eq 1 ]; then echo "rbs-seed-test: pass"; \src/analyze.cmodifiedView file
Loading diff…