Skip to content

The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.

test(process-statics): cover numeric and supplementary unicode token boundaries

Steven Enamakel88e199c7389c
diff --git a/scripts/__tests__/process-statics.test.mjs b/scripts/__tests__/process-statics.test.mjs
index 94dcdace1d..cd9fbbc8ec 100644
--- a/scripts/__tests__/process-statics.test.mjs
+++ b/scripts/__tests__/process-statics.test.mjs
@@ -326,3 +326,12 @@ test("literal static declarations in macro templates require source ownership re
assert.equal(after.length, 1);
assert.equal(reviewChanges(before, after, []).length, 1);
});
+
+test("numeric and supplementary Unicode macro token boundaries remain distinct", () => {
+ for (const [left, right] of [["1 . 0", "1.0"], ["𐐀 𐐁", "𐐀𐐁"]]) {
+ const before = scan(`static X: ty!(${left}) = x;`);
+ const after = scan(`static X: ty!(${right}) = x;`);
+ assert.notEqual(before[0].type, after[0].type, left);
+ assert.equal(reviewChanges(before, after, []).length, 1);
+ }
+});