Skip to content

Commit

Permalink
#205: link fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
yegor256 committed Dec 22, 2023
1 parent 69913b0 commit 2634ad4
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 3 deletions.
4 changes: 4 additions & 0 deletions src/eoc.js
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,7 @@ program.command('compile')
if (program.opts().alone == undefined) {
register(program.opts())
.then((r) => assemble(program.opts()))
.then((r) => verify(program.opts()))
.then((r) => transpile(program.opts()))
.then((r) => compile(program.opts()));
} else {
Expand All @@ -192,6 +193,7 @@ program.command('link')
if (program.opts().alone == undefined) {
register(program.opts())
.then((r) => assemble(program.opts()))
.then((r) => verify(program.opts()))
.then((r) => transpile(program.opts()))
.then((r) => compile(program.opts()))
.then((r) => link(program.opts()));
Expand All @@ -208,6 +210,7 @@ program.command('dataize')
if (program.opts().alone == undefined) {
register(program.opts())
.then((r) => assemble(program.opts()))
.then((r) => verify(program.opts()))
.then((r) => transpile(program.opts()))
.then((r) => compile(program.opts()))
.then((r) => link(program.opts()))
Expand All @@ -224,6 +227,7 @@ program.command('test')
if (program.opts().alone == undefined) {
register(program.opts())
.then((r) => assemble(program.opts()))
.then((r) => verify(program.opts()))
.then((r) => transpile(program.opts()))
.then((r) => compile(program.opts()))
.then((r) => link(program.opts()))
Expand Down
2 changes: 2 additions & 0 deletions test/commands/test_assemble.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ describe('assemble', function() {
'assemble',
'--verbose',
'--track-optimization-steps',
'--parser=0.34.1',
'--hash=1d605bd872f27494551e9dd2341b9413d0d96d89',
'-s', path.resolve(home, 'src'),
'-t', path.resolve(home, 'target'),
]);
Expand Down
2 changes: 2 additions & 0 deletions test/commands/test_dataize.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@ describe('dataize', function() {
'--verbose',
'--stack=64M',
'--clean',
'--parser=0.34.1',
'--hash=1d605bd872f27494551e9dd2341b9413d0d96d89',
'-s', path.resolve(home, 'src'),
'-t', path.resolve(home, 'target'),
]);
Expand Down
8 changes: 5 additions & 3 deletions test/commands/test_link.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,20 +31,22 @@ describe('link', function() {
it('compiles a simple .EO program into an executable .JAR', function(done) {
home = path.resolve('temp/test-link/simple');
fs.rmSync(home, {recursive: true, force: true});
fs.mkdirSync(path.resolve(home, 'src'), {recursive: true});
fs.mkdirSync(path.resolve(home, 'src/foo/bar'), {recursive: true});
fs.writeFileSync(
path.resolve(home, 'src/simple.eo'),
path.resolve(home, 'src/foo/bar/simple.eo'),
[
'+package foo.bar',
'+alias org.eolang.io.stdout',
'',
'[args...] > app',
'[args] > app',
' stdout "Hello, world!" > @',
].join('\n')
);
const stdout = runSync([
'link',
'--verbose',
'--parser=0.34.1',
'--hash=1d605bd872f27494551e9dd2341b9413d0d96d89',
'-s', path.resolve(home, 'src'),
'-t', path.resolve(home, 'target'),
]);
Expand Down
2 changes: 2 additions & 0 deletions test/commands/test_parse.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ describe('parse', function() {
const stdout = runSync([
'parse',
'--verbose',
'--parser=0.34.1',
'--hash=1d605bd872f27494551e9dd2341b9413d0d96d89',
'-s', path.resolve(home, 'src'),
'-t', path.resolve(home, 'target'),
]);
Expand Down
2 changes: 2 additions & 0 deletions test/commands/test_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ describe('test', function() {
const stdout = runSync([
'test',
'--verbose',
'--parser=0.34.1',
'--hash=1d605bd872f27494551e9dd2341b9413d0d96d89',
'-s', path.resolve(home, 'src'),
'-t', path.resolve(home, 'target'),
]);
Expand Down

0 comments on commit 2634ad4

Please sign in to comment.