Skip to content

Commit

Permalink
make updateInlineTestData match multiline string
Browse files Browse the repository at this point in the history
  • Loading branch information
benesjan committed Apr 29, 2024
1 parent 6cafdc4 commit 36d0402
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ fn check_point_to_symmetric_key() {
);

let key = point_to_symmetric_key(secret, point);
let expected_key = [25,176,196,77,91,235,218,204,186,157,195,137,205,53,141,10,90,174,222,204,191,49,246,123,99,87,121,67,99,117,50,29];
let expected_key = [
25, 176, 196, 77, 91, 235, 218, 204, 186, 157, 195, 137, 205, 53, 141, 10, 90, 174, 222, 204, 191, 49, 246, 123, 99, 87, 121, 67, 99, 117, 50, 29
];
assert_eq(key, expected_key);
}
2 changes: 1 addition & 1 deletion yarn-project/foundation/src/testing/test_data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ export function updateInlineTestData(targetFileFromRepoRoot: string, itemName: s
const logger = createConsoleLogger('aztec:testing:test_data');
const targetFile = getPathToFile(targetFileFromRepoRoot);
const contents = readFileSync(targetFile, 'utf8').toString();
const regex = new RegExp(`let ${itemName} = .*;`, 'g');
const regex = new RegExp(`let ${itemName} = [\\s\\S]*?;`, 'g');
if (!regex.exec(contents)) {
throw new Error(`Test data marker for ${itemName} not found in ${targetFile}`);
}
Expand Down

0 comments on commit 36d0402

Please sign in to comment.