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

REPL Proper Testing #145

Merged
merged 8 commits into from
Nov 9, 2023
Merged

REPL Proper Testing #145

merged 8 commits into from
Nov 9, 2023

Conversation

melsman
Copy link
Owner

@melsman melsman commented Nov 8, 2023

We need to set up proper automatic testing for the REPL, including testing of the various commands and with the basis library loaded...

Also, there are a number of ways in which the REPL can crash (or get into an unfortunate state), including (1) entering the expression Posix.Process.fork() at toplevel, (2) entering the expression OS.FileSys.chDir "..", or (3) reloading an mlb-file after changing some of the source files it refers to. There seem to be no way (in general) to guard against the user doing stupid things like (1) above or by entering(OS.Process.exit 0 : int), or deleting the MLB directory that holds temporary files for the REPL. Problem (2) above we can fix, however. Problem (3) is difficult to solve and we will not make an attempt to solve (3) here, but we will make support for resetting the child process by adding a :reset command. To do something about (3), we first need to detect changes to loaded target code and changes to assumed bases.

Progress:

  • Test some basis library functionality.
  • Test loading of mlb-file.
  • Test type-indexed pretty-printing of boxed and unboxed types.
  • Test :set command.
  • Add :reset command for respawning the child process.
  • Use absolute directories in Repl.c so that OS.FileSys.chDir does not confuse the REPL.

@melsman melsman self-assigned this Nov 8, 2023
@melsman melsman merged commit 9aa5e66 into master Nov 9, 2023
4 checks passed
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

Successfully merging this pull request may close these issues.

None yet

1 participant