Skip to content
This repository was archived by the owner on Sep 23, 2025. It is now read-only.

Commit ce8660f

Browse files
committed
Hook up notexist test
1 parent 6dfbae9 commit ce8660f

File tree

3 files changed

+11
-2
lines changed

3 files changed

+11
-2
lines changed

tests/rgbasm.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@ use tempfile::NamedTempFile;
55

66
datatest_stable::harness! {
77
{ test = run_test, root = "tests/rgbasm", pattern = r"test\.asm$" },
8-
// TODO: `version.asm`, `notexist.asn`, other special tests in `test.sh`
8+
{ test = run_notexist_test, root = "tests/rgbasm", pattern = r"notexist/stderr\.log$" },
9+
// TODO: `version.asm`, other special tests in `test.sh`
910
}
1011

1112
const RGBASM_PATH: &str = env!("CARGO_BIN_EXE_rgbasm");
@@ -16,6 +17,10 @@ const ACTION_ENV_VAR_NAME: &str = "SNAPSHOTS_ASM";
1617
// Game Boy release date, 1989-04-21T12:34:56Z (for reproducible test results)
1718
const TIMESTAMP: &str = "609165296";
1819

20+
fn run_notexist_test(err_path: &Utf8Path) -> datatest_stable::Result<()> {
21+
run_test(&err_path.with_file_name("test.asm"))
22+
}
23+
1924
fn run_test(asm_path: &Utf8Path) -> datatest_stable::Result<()> {
2025
// We need to pass the path to `rgbasm`, but we don't really care for security.
2126
let obj_file = NamedTempFile::new().context("Unable to create temp obj file")?;

tests/rgbasm/notexist.err

Lines changed: 0 additions & 1 deletion
This file was deleted.

tests/rgbasm/notexist/stderr.log

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
error: failed to open "tests/rgbasm/notexist/test.asm"
2+
3+
│ Note: No such file or directory (os error 2)
4+
──╯
5+
1 error generated.

0 commit comments

Comments
 (0)