skx / cpmulator

Golang CP/M emulator for zork, Microsoft BASIC, Turbo Pascal, Wordstar, lighthouse-of-doom, etc
MIT License
98 stars 3 forks source link

Add integration tests #154

Closed skx closed 3 months ago

skx commented 3 months ago

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.

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

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