Skip to content

Commit

Permalink
Added a simple acceptance test
Browse files Browse the repository at this point in the history
  • Loading branch information
davesmith00000 committed Sep 2, 2023
1 parent 7c02dd1 commit 2ada751
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
package indigoplugin.core

import indigoplugin.IndigoAssets

class AcceptanceTests extends munit.FunSuite {

val sourceDir = os.RelPath("test-assets")

val targetDir = os.pwd / "out" / "indigo-plugin-acceptance-test-output"

override def beforeAll(): Unit = {
if (os.exists(targetDir)) {
os.remove(target = targetDir, checkExists = true)
}

os.makeDir.all(targetDir)
}

val indigoAssets =
IndigoAssets(
gameAssetsDirectory = sourceDir,
include = { case _ => false },
exclude = { case _ => false }
)

test("Copy assets and assert expected output files") {

IndigoBuild.copyAssets(indigoAssets, targetDir)

assert(os.exists(targetDir))
assert(os.exists(targetDir / "foo.txt"))
}

}
1 change: 1 addition & 0 deletions indigo-plugin/test-assets/foo.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Hello, world!

0 comments on commit 2ada751

Please sign in to comment.