diff options
| author | modmuss50 <modmuss50@gmail.com> | 2021-03-06 11:40:07 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-03-06 11:40:07 +0000 |
| commit | 87f3743b2423b59e40ca5a74e8641affffa57499 (patch) | |
| tree | 2c2b04051a4161dc4387f1a735bc28502902fee8 /src/test/groovy/net/fabricmc/loom/SimpleBuildFunctionalTest.groovy | |
| parent | 679026ef31d619409187a564bc0623891f5979e6 (diff) | |
| download | architectury-loom-87f3743b2423b59e40ca5a74e8641affffa57499.tar.gz architectury-loom-87f3743b2423b59e40ca5a74e8641affffa57499.tar.bz2 architectury-loom-87f3743b2423b59e40ca5a74e8641affffa57499.zip | |
Rewrite tests to be easier to write and maintain (#361)
Diffstat (limited to 'src/test/groovy/net/fabricmc/loom/SimpleBuildFunctionalTest.groovy')
| -rw-r--r-- | src/test/groovy/net/fabricmc/loom/SimpleBuildFunctionalTest.groovy | 62 |
1 files changed, 0 insertions, 62 deletions
diff --git a/src/test/groovy/net/fabricmc/loom/SimpleBuildFunctionalTest.groovy b/src/test/groovy/net/fabricmc/loom/SimpleBuildFunctionalTest.groovy deleted file mode 100644 index 756a3faa..00000000 --- a/src/test/groovy/net/fabricmc/loom/SimpleBuildFunctionalTest.groovy +++ /dev/null @@ -1,62 +0,0 @@ -package net.fabricmc.loom - -import org.gradle.testkit.runner.GradleRunner -import org.junit.Rule -import org.junit.rules.TemporaryFolder -import spock.lang.Specification -import spock.lang.Unroll - -import static net.fabricmc.loom.BuildUtils.* -import static org.gradle.testkit.runner.TaskOutcome.SUCCESS - -/** - * Created by Mitchell Skaggs on 6/10/2019. - */ -class SimpleBuildFunctionalTest extends Specification { - @Rule - TemporaryFolder testProjectDir = new TemporaryFolder() - File settingsFile - File buildFile - File propsFile - File modJsonFile - File modExampleFile - - def setup() { - settingsFile = testProjectDir.newFile('settings.gradle') - buildFile = testProjectDir.newFile('build.gradle') - propsFile = testProjectDir.newFile('gradle.properties') - - testProjectDir.newFolder("src", "main", "resources") - modJsonFile = testProjectDir.newFile('src/main/resources/fabric.mod.json') - - testProjectDir.newFolder("src", "main", "java", "net", "fabricmc", "example") - modExampleFile = testProjectDir.newFile("src/main/java/net/fabricmc/example/ExampleMod.java") - } - - @Unroll - def "simple build succeeds using Minecraft #mcVersion"() { - given: - settingsFile << genSettingsFile("simple-build-functional-test") - propsFile << genPropsFile(mcVersion, yarnVersion, loaderVersion, fabricVersion) - buildFile << genBuildFile() - modJsonFile << genModJsonFile() - modExampleFile << genModJavaFile() - - when: - def result = GradleRunner.create() - .withProjectDir(testProjectDir.root) - .withArguments('build',"--stacktrace", "--warning-mode", System.getenv().TEST_WARNING_MODE ?: 'all') - .withPluginClasspath() - .forwardOutput() - .withDebug(true) - .build() - - then: - result.task(":build").outcome == SUCCESS - - where: - mcVersion | yarnVersion | loaderVersion | fabricVersion - '19w45a' | '19w45a+build.2:v2' | '0.6.2+build.166' | '0.4.9+build.258-1.15' - '1.14' | '1.14+build.21' | '0.4.8+build.155' | '0.3.0+build.184' - } -} |
