add a unit test that checks for 64tass availability

This commit is contained in:
Irmen de Jong 2023-05-23 20:42:36 +02:00
parent b5255444cd
commit 48864ad6cf

View File

@ -1,5 +1,6 @@
package prog8tests.codegencpu6502 package prog8tests.codegencpu6502
import io.kotest.assertions.throwables.shouldNotThrowAny
import io.kotest.core.spec.style.FunSpec import io.kotest.core.spec.style.FunSpec
import io.kotest.matchers.shouldBe import io.kotest.matchers.shouldBe
import prog8.code.SymbolTableMaker import prog8.code.SymbolTableMaker
@ -102,5 +103,14 @@ class TestCodegen: FunSpec({
result.name shouldBe "test" result.name shouldBe "test"
Files.deleteIfExists(Path("${result.name}.asm")) 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)
}
}
}) })