Skip to content

Commit

Permalink
Generate binary AST on the fly in stdin input driver test
Browse files Browse the repository at this point in the history
The point of this test is not to ensure we can read binary ASTs
from a different version than the one the driver is compiled with.
There is already another test for this use case.

Signed-off-by: Nathan Rebours <[email protected]>
  • Loading branch information
NathanReb authored and panglesd committed Feb 16, 2024
1 parent fe4a387 commit 41b97a5
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
Binary file removed test/driver/stdin_input/test.t/binary_ast
Binary file not shown.
12 changes: 10 additions & 2 deletions test/driver/stdin_input/test.t/run.t
Original file line number Diff line number Diff line change
@@ -1,12 +1,20 @@
The driver can read from stdin. Both when the input is source code...
The driver can read from stdin.

It works with sources...

$ ../identity_driver.exe -impl - << EOF
> let a = 1
> EOF
let a = 1

...and when the input is a binary AST.
... but it should also work with binary ASTs.
We generate a binary AST file...

$ ../identity_driver.exe --dump-ast -o binary_ast -impl - << EOF
> let b = 2
> EOF

... and ensure the driver can also read it from stdin

$ cat binary_ast | ../identity_driver.exe -impl -
let b = 2

0 comments on commit 41b97a5

Please sign in to comment.