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 whitespace significance in type literals

Steven Enamakel91cae5cb637a
diff --git a/scripts/__tests__/process-statics.test.mjs b/scripts/__tests__/process-statics.test.mjs
index 72e3044aca..7742693c3b 100644
--- a/scripts/__tests__/process-statics.test.mjs
+++ b/scripts/__tests__/process-statics.test.mjs
@@ -104,6 +104,13 @@ test("ABI literals remain part of the declared type signature", () => {
assert.equal(reviewChanges(before, after, []).length, 1);
});
+test("whitespace inside type literals remains significant", () => {
+ const before = scan('static X: [u8; "a b".len()] = x;');
+ const after = scan('static X: [u8; "ab".len()] = x;');
+ assert.notEqual(before[0].type, after[0].type);
+ assert.equal(reviewChanges(before, after, []).length, 1);
+});
+
test("finds multiline, qualified, mutable and lazy_static declarations", () => {
assert.deepEqual(
scan(