diff options
author | shedaniel <daniel@shedaniel.me> | 2021-09-12 03:15:45 +0800 |
---|---|---|
committer | shedaniel <daniel@shedaniel.me> | 2021-09-12 03:15:45 +0800 |
commit | 29f38b1d2818f916e9ec1848abd592a3d6499fc2 (patch) | |
tree | 905e0d039c6b9c8993e562d1d8f703d5ccdc794d /src/test/groovy | |
parent | aad95823844eb8319d3b25b6c8da34a715061c7a (diff) | |
download | architectury-loom-29f38b1d2818f916e9ec1848abd592a3d6499fc2.tar.gz architectury-loom-29f38b1d2818f916e9ec1848abd592a3d6499fc2.tar.bz2 architectury-loom-29f38b1d2818f916e9ec1848abd592a3d6499fc2.zip |
Merge two tests
Signed-off-by: shedaniel <daniel@shedaniel.me>
Diffstat (limited to 'src/test/groovy')
-rw-r--r-- | src/test/groovy/net/fabricmc/loom/test/integration/forge/Aw2AtTest.groovy | 20 | ||||
-rw-r--r-- | src/test/groovy/net/fabricmc/loom/test/integration/forge/LegacyAw2AtTest.groovy | 49 |
2 files changed, 16 insertions, 53 deletions
diff --git a/src/test/groovy/net/fabricmc/loom/test/integration/forge/Aw2AtTest.groovy b/src/test/groovy/net/fabricmc/loom/test/integration/forge/Aw2AtTest.groovy index 734616f1..bf73986d 100644 --- a/src/test/groovy/net/fabricmc/loom/test/integration/forge/Aw2AtTest.groovy +++ b/src/test/groovy/net/fabricmc/loom/test/integration/forge/Aw2AtTest.groovy @@ -31,7 +31,7 @@ import static net.fabricmc.loom.test.LoomTestConstants.* import static org.gradle.testkit.runner.TaskOutcome.SUCCESS class Aw2AtTest extends Specification implements GradleProjectTestTrait { - def build() { + def "build"() { setup: def gradle = gradleProject(project: "forge/aw2At", version: DEFAULT_GRADLE) @@ -43,7 +43,19 @@ class Aw2AtTest extends Specification implements GradleProjectTestTrait { gradle.getOutputZipEntry("fabric-example-mod-1.0.0.jar", "META-INF/accesstransformer.cfg") == expected(gradle).replaceAll('\r', '') } - String expected() { - return new File(gradle.projectDir, "expected.accesstransformer.cfg").text - } + def "legacy build"() { + setup: + def gradle = gradleProject(project: "forge/legacyAw2At", version: DEFAULT_GRADLE) + + when: + def result = gradle.run(task: "build") + + then: + result.task(":build").outcome == SUCCESS + gradle.getOutputZipEntry("fabric-example-mod-1.0.0.jar", "META-INF/accesstransformer.cfg") == expected(gradle).replaceAll('\r', '') + } + + String expected(gradle) { + return new File(gradle.projectDir, "expected.accesstransformer.cfg").text + } } diff --git a/src/test/groovy/net/fabricmc/loom/test/integration/forge/LegacyAw2AtTest.groovy b/src/test/groovy/net/fabricmc/loom/test/integration/forge/LegacyAw2AtTest.groovy deleted file mode 100644 index ab5f2c0f..00000000 --- a/src/test/groovy/net/fabricmc/loom/test/integration/forge/LegacyAw2AtTest.groovy +++ /dev/null @@ -1,49 +0,0 @@ -/* - * This file is part of fabric-loom, licensed under the MIT License (MIT). - * - * Copyright (c) 2021 FabricMC - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -package net.fabricmc.loom.test.integration.forge - -import net.fabricmc.loom.test.util.GradleProjectTestTrait -import spock.lang.Specification - -import static net.fabricmc.loom.test.LoomTestConstants.* -import static org.gradle.testkit.runner.TaskOutcome.SUCCESS - -class LegacyAw2AtTest extends Specification implements GradleProjectTestTrait { - def build() { - setup: - def gradle = gradleProject(project: "forge/legacyAw2At", version: DEFAULT_GRADLE) - - when: - def result = gradle.run(task: "build") - - then: - result.task(":build").outcome == SUCCESS - gradle.getOutputZipEntry("fabric-example-mod-1.0.0.jar", "META-INF/accesstransformer.cfg") == expected(gradle).replaceAll('\r', '') - } - - String expected(gradle) { - return new File(gradle.projectDir, "expected.accesstransformer.cfg").text - } -} |