1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-12-30 02:59:11 -05:00
denoland-deno/tests/specs/compile/determinism/assert_equal.ts

16 lines
359 B
TypeScript
Raw Normal View History

const file1 = Deno.readFileSync(Deno.args[0]);
const file2 = Deno.readFileSync(Deno.args[1]);
if (file1.length !== file2.length) {
console.error("File lengths are different");
Deno.exit(1);
}
for (let i = 0; i < file1.length; i++) {
if (file1[i] !== file2[i]) {
console.error("Files are different");
Deno.exit(1);
}
}
console.error("Same");