forked from it-for-free/pascal.js
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
vedro-compota
committed
Sep 5, 2021
1 parent
7a1e600
commit 7bba0cb
Showing
2 changed files
with
24 additions
and
0 deletions.
There are no files selected for viewing
15 changes: 15 additions & 0 deletions
15
tests/__tests__/custom_subprograms/procedures/procedure_base/procedure_base.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); | ||
}); | ||
|
||
|
||
|
9 changes: 9 additions & 0 deletions
9
tests/__tests__/custom_subprograms/procedures/procedure_base/procedure_base.pas
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. |