Skip to content

Commit

Permalink
Integration tests fro #13
Browse files Browse the repository at this point in the history
  • Loading branch information
ivanizag committed Jul 9, 2024
1 parent 22abd1c commit 3bfcb70
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 3 deletions.
3 changes: 0 additions & 3 deletions src/bdos_environment.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,6 @@ impl BdosState {
self.dma = DEFAULT_DMA;
self.dir_pattern = "????????.???".to_string();
self.dir_pos = 0;


self.drive = 0;
}
}

Expand Down
Binary file added tests/artifacts/ret.com
Binary file not shown.
2 changes: 2 additions & 0 deletions tests/artifacts/ret.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
File ret.com downloaded from https://github.com/skx/cpmulator/blob/b711db6b3cb0f814732748cb9492b285169194e9/samples/ret.com ,
it is part of the cpmulator project by Steve Kemp.
37 changes: 37 additions & 0 deletions tests/issue13.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
mod common;
use common::*;
use izcpm::Step;

// Integration tests for issue https://github.com/ivanizag/iz-cpm/issues/13

fn test_issue13(mode: u8) {
run_script_with_args(vec!(
Step::Expect("A>"),
Step::Input("B:\r"),
Step::Expect("B>"),
Step::Input(&format!("ret {}\r", mode)),
Step::Expect("B>"),
), vec!("-b", "tests/artifacts")
);
}


#[test]
fn test_issue13_jp() {
test_issue13(1);
}

#[test]
fn test_issue13_rst() {
test_issue13(2);
}

#[test]
fn test_issue13_ret() {
test_issue13(3);
}

#[test]
fn test_issue13_call() {
test_issue13(4);
}

0 comments on commit 3bfcb70

Please sign in to comment.