Skip to content

Commit

Permalink
chore(test): Remove preceding extra newlines from expected outputs
Browse files Browse the repository at this point in the history
  • Loading branch information
byakuren-hijiri committed May 30, 2024
1 parent b122dd2 commit 8be966c
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 5 deletions.
3 changes: 2 additions & 1 deletion test/builtinDetectors.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ processTactFiles(CONTRACTS_DIR, (file) => {
const runCommand = `node dist/src/main.js ${configPath}`;
await new Promise((resolve, reject) => {
exec(runCommand, (error, stdout, stderr) => {
fs.writeFileSync(outputFilePath, stdout + stderr);
const out = stdout.trim() + stderr.trim();
fs.writeFileSync(outputFilePath, out ? out : "\n");
if (error) {
reject(error);
} else {
Expand Down
1 change: 1 addition & 0 deletions test/contracts/conditional-1.expected.out
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

1 change: 1 addition & 0 deletions test/contracts/linear-flow-1.expected.out
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

1 change: 1 addition & 0 deletions test/contracts/loops-1.expected.out
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

1 change: 1 addition & 0 deletions test/contracts/readonly-1.expected.out
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

3 changes: 1 addition & 2 deletions test/contracts/readonly-2.expected.out
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@

test/contracts/readonly-2.tact:2:5:
1 | fun test1(): Int {
> 2 | let a: Int = 20;
^
3 | let b: Int = 22;
Variable is never used
Variable is never used
3 changes: 1 addition & 2 deletions test/contracts/zero-address.expected.out
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@

test/contracts/zero-address.tact:3:23:
2 | init() {
> 3 | newAddress(1, 0x000000000000000000000000000000000000000000000000);
^
4 | }
Using zero address
Using zero address

0 comments on commit 8be966c

Please sign in to comment.