From 48864ad6cfe6036ce2bda02dd5d6fe20b67b3df9 Mon Sep 17 00:00:00 2001
From: Irmen de Jong <irmen@razorvine.net>
Date: Tue, 23 May 2023 20:42:36 +0200
Subject: [PATCH] add a unit test that checks for 64tass availability

---
 codeGenCpu6502/test/TestCodegen.kt | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/codeGenCpu6502/test/TestCodegen.kt b/codeGenCpu6502/test/TestCodegen.kt
index 92b1b541b..f65522269 100644
--- a/codeGenCpu6502/test/TestCodegen.kt
+++ b/codeGenCpu6502/test/TestCodegen.kt
@@ -1,5 +1,6 @@
 package prog8tests.codegencpu6502
 
+import io.kotest.assertions.throwables.shouldNotThrowAny
 import io.kotest.core.spec.style.FunSpec
 import io.kotest.matchers.shouldBe
 import prog8.code.SymbolTableMaker
@@ -102,5 +103,14 @@ class TestCodegen: FunSpec({
         result.name shouldBe "test"
         Files.deleteIfExists(Path("${result.name}.asm"))
     }
+
+    test("64tass assembler available? - if this fails you need to install 64tass in the path") {
+        val command = mutableListOf("64tass", "--version")
+        shouldNotThrowAny {
+            val proc = ProcessBuilder(command).inheritIO().start()
+            val result = proc.waitFor()
+            result.shouldBe(0)
+        }
+    }
 })