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 integration tests #154

Closed
skx opened this issue Jul 13, 2024 · 0 comments · Fixed by #155
Closed

Add integration tests #154

skx opened this issue Jul 13, 2024 · 0 comments · Fixed by #155

Comments

@skx
Copy link
Owner

skx commented Jul 13, 2024

iz-cpm made some interesting recent commits, to add support for expect-like integration tests.

 Step::Expect("A>"),
        Step::Input("B:\r"),
        Step::Expect("B>"),
        Step::Input(&format!("ret {}\r", mode)),
        Step::Expect("B>"),

That's pretty awesome to see. Right now I can't do anything like that, stepping and getting/setting the input/output. However I do have support for pluggable output drivers.

  • Create a new driver for storing characters to be output, instead of displaying them.
    • Make sure that implements a "get history" interface so we can retrieve it.
  • Update our input-stuffing to cover more than just "ReadLine".

That should allow us to write a test, although the input will need to be "complete", for example:

  • C:\nDIR\nEXIT

I think that should work without any single-stepping required.

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 a pull request may close this issue.

1 participant