Skip to content
This repository has been archived by the owner on Sep 7, 2023. It is now read-only.

Commit

Permalink
(fix) Use relative path in engine file names
Browse files Browse the repository at this point in the history
Signed-off-by: Jerome Simeon <[email protected]>
  • Loading branch information
jeromesimeon committed Mar 19, 2019
1 parent b24c232 commit f82998d
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 21 deletions.
27 changes: 12 additions & 15 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/ergo-cli/extracted/ergotopcore.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions packages/ergo-engine/test/engine.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,12 +65,12 @@ describe('Execute ES6', () => {
for (let i = 0; i < ergo.length; i++) {
const ergoFile = Path.resolve(__dirname, dir, ergo[i]);
const ergoContent = Fs.readFileSync(ergoFile, 'utf8');
templateLogic.addLogicFile(ergoContent,ergoFile);
templateLogic.addLogicFile(ergoContent, Path.join(dir, ergo[i]));
}
for (let i = 0; i < models.length; i++) {
const ctoFile = Path.resolve(__dirname, dir, models[i]);
const ctoContent = Fs.readFileSync(ctoFile, 'utf8');
templateLogic.addModelFile(ctoContent,ctoFile);
templateLogic.addModelFile(ctoContent, Path.join(dir, models[i]));
}
templateLogic.setContractName(contractName);
const contractJson = JSON.parse(Fs.readFileSync(Path.resolve(__dirname, dir, contract), 'utf8'));
Expand Down Expand Up @@ -157,12 +157,12 @@ describe('Execute ES5', () => {
for (let i = 0; i < ergo.length; i++) {
const ergoFile = Path.resolve(__dirname, dir, ergo[i]);
const ergoContent = Fs.readFileSync(ergoFile, 'utf8');
templateLogic.addLogicFile(ergoContent,ergoFile);
templateLogic.addLogicFile(ergoContent, Path.join(dir, ergo[i]));
}
for (let i = 0; i < models.length; i++) {
const ctoFile = Path.resolve(__dirname, dir, models[i]);
const ctoContent = Fs.readFileSync(ctoFile, 'utf8');
templateLogic.addModelFile(ctoContent,ctoFile);
templateLogic.addModelFile(ctoContent, Path.join(dir, models[i]));
}
const contractJson = JSON.parse(Fs.readFileSync(Path.resolve(__dirname, dir, contract), 'utf8'));
if (state === null) {
Expand Down
2 changes: 1 addition & 1 deletion packages/ergo-engine/test/workload.json
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@
"clauseName": "helloworld",
"currentTime": "2019-01-01T16:34:00-05:00",
"expected": {
"error": "Parse error (at file /Users/jeromesimeon/git/ergo/packages/ergo-engine/test/examples/bad-logic/logic.ergo line 17 col 20). \ncontract HelloWorld ovr TemplateModel {\n ^^^ "
"error": "Parse error (at file examples/bad-logic/logic.ergo line 17 col 20). \ncontract HelloWorld ovr TemplateModel {\n ^^^ "
}
}
]

0 comments on commit f82998d

Please sign in to comment.