Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add automated tests #20

Open
5 tasks
sohang3112 opened this issue Jun 5, 2024 · 0 comments
Open
5 tasks

Add automated tests #20

sohang3112 opened this issue Jun 5, 2024 · 0 comments
Assignees

Comments

@sohang3112
Copy link
Owner

sohang3112 commented Jun 5, 2024

Test Setup:

import forth_kernel
kernel = forth_kernel.ForthKernel()
  • Test that kernel.language_version is of the correct format (eg. Gforth 0.7.3)
  • Test that Forth input code is being syntax highlighted properly (not sure how to test this)
  • Test shell command: !echo hello world should return hello world in stdout. NOTE: This is currently failing - only single-word commands like ls are working.
  • Do multiple Jupyter Notebooks continue working concurrently even if one hangs - eg. if I run long-running code in 1 Jupyter Notebook, and simultaneously run short code 1 2 + . in another Jupyter Notebook, does the second notebook still respond or does it hang until first notebook is done executing?
  • Test that for this input:
1 2 + .
.
bye

Stdout output is (NOTE that the stdout output from kernel is in HTML, so first convert to text and then compare, ignoring whitespace):

1 2 + . 3  ok
. 
bye

Stderr error output is (strip whitespace; just check "Stack underflow", ignore text before that in first line:

:2: Stack underflow
>>>.<<<
Backtrace:
...
Killing kernel because GForth process has died
@sohang3112 sohang3112 self-assigned this Jun 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant