From 0087cc0631ae8e8b1892e674e34a9daa84ad0bb9 Mon Sep 17 00:00:00 2001 From: Miquel Sabaté Solà Date: Fri, 20 Dec 2024 16:49:46 +0100 Subject: Introduce end-to-end tests MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit For now I have added the most simple example for an NES/Famicom game, which I already had on a private repository (that I plan to open source soonish). Tests simply run `nasm` on known source files and compares the results with an .nes ROM file that has the exact bytes that we expect. Signed-off-by: Miquel Sabaté Solà --- scripts/test-e2e.sh | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100755 scripts/test-e2e.sh (limited to 'scripts/test-e2e.sh') diff --git a/scripts/test-e2e.sh b/scripts/test-e2e.sh new file mode 100755 index 0000000..32bd76f --- /dev/null +++ b/scripts/test-e2e.sh @@ -0,0 +1,11 @@ +#!/usr/bin/env sh + +set -ex + +rm -rf tests/out/ +mkdir -p tests/out/ + +cargo build + +./target/debug/nasm -c nrom -Werror -o tests/out/sprite.nes tests/src/sprite.s +diff tests/out/sprite.nes tests/bin/sprite.nes -- cgit v1.2.3