Skip to content

Commit

Permalink
base procedures test
Browse files Browse the repository at this point in the history
  • Loading branch information
vedro-compota committed Sep 5, 2021
1 parent 7a1e600 commit 7bba0cb
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import { expect, test } from '@jest/globals';
import { getOneVarOutputStreamConfig, TESTING_NEW_LINE_SYMBOL } from '../../../../helpers/output_stream/OneVarOutputStream ';


import { runFile } from '../../../../helpers/testsHelper';

const config = getOneVarOutputStreamConfig();
let pjs = runFile(import.meta.url, 'procedure_base.pas', false, config);

test("check output", () => {
expect(config.outputStream.value).toBe('123' + TESTING_NEW_LINE_SYMBOL);
});



Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@

procedure echo(s: string);
begin
writeln(s);
end;

begin
echo('123');
end.

0 comments on commit 7bba0cb

Please sign in to comment.