@@ -645,4 +645,36 @@ TEST_F(Fixture, TestLef58AntennaGatePlusDiff)
645645 EXPECT_EQ (pwl.ratios [1 ], 4.0 );
646646}
647647
648+ // Regression test for issue #10668: a CELLEDGESPACINGTABLE EDGETYPE group name
649+ // that is numeric or a single character (e.g. "1") must parse correctly and
650+ // must not trigger ODB-0299 (parse mismatch).
651+ TEST_F (Fixture, TestLef58CellEdgeSpacingNumericEdgeType)
652+ {
653+ const char * libname = " lef58_celledgespacing_numeric.lef" ;
654+ loadTechAndLib (
655+ " tech" , libname, prefix + " data/lef58_celledgespacing_numeric.lef" );
656+
657+ dbTech* tech = db_->getTech ();
658+ auto cell_edge_spacing_tbl = tech->getCellEdgeSpacingTable ();
659+ // All three entries must be parsed (numeric, mixed numeric/alpha, and alpha).
660+ EXPECT_EQ (cell_edge_spacing_tbl.size (), 3 );
661+
662+ auto it = cell_edge_spacing_tbl.begin ();
663+ auto edge_spc = *it;
664+ EXPECT_EQ (edge_spc->getFirstEdgeType (), " 1" );
665+ EXPECT_EQ (edge_spc->getSecondEdgeType (), " 1" );
666+ EXPECT_EQ (edge_spc->getSpacing (), 0.4 * 1000 );
667+
668+ edge_spc = *(++it);
669+ EXPECT_EQ (edge_spc->getFirstEdgeType (), " 1" );
670+ EXPECT_EQ (edge_spc->getSecondEdgeType (), " G2" );
671+ EXPECT_EQ (edge_spc->getSpacing (), 0.2 * 1000 );
672+
673+ // Alpha/multi-char group names (the pre-existing form) must still work.
674+ edge_spc = *(++it);
675+ EXPECT_EQ (edge_spc->getFirstEdgeType (), " G1" );
676+ EXPECT_EQ (edge_spc->getSecondEdgeType (), " G1" );
677+ EXPECT_EQ (edge_spc->getSpacing (), 0.1 * 1000 );
678+ }
679+
648680} // namespace odb
0 commit comments