aboutsummaryrefslogtreecommitdiff
path: root/src/functionalTest/java/ch/fhnw
diff options
context:
space:
mode:
authorThibault Gagnaux <tgagnaux@gmail.com>2021-11-24 10:27:00 +0100
committerThibault Gagnaux <tgagnaux@gmail.com>2021-11-24 10:27:00 +0100
commit1f13c769f57d4670cee462b6cf741efb5f5a8cd6 (patch)
tree8f701a527ec89459f400fffd3dba8632da29fc8d /src/functionalTest/java/ch/fhnw
parent4f287790c285a1503bc05d75e1561de122f9a79e (diff)
downloadfrege-gradle-plugin-1f13c769f57d4670cee462b6cf741efb5f5a8cd6.tar.gz
frege-gradle-plugin-1f13c769f57d4670cee462b6cf741efb5f5a8cd6.tar.bz2
frege-gradle-plugin-1f13c769f57d4670cee462b6cf741efb5f5a8cd6.zip
feat: adds `replFrege` taskf-repl-task
Diffstat (limited to 'src/functionalTest/java/ch/fhnw')
-rw-r--r--src/functionalTest/java/ch/fhnw/thga/gradleplugins/FregePluginFunctionalTest.java25
1 files changed, 20 insertions, 5 deletions
diff --git a/src/functionalTest/java/ch/fhnw/thga/gradleplugins/FregePluginFunctionalTest.java b/src/functionalTest/java/ch/fhnw/thga/gradleplugins/FregePluginFunctionalTest.java
index c8cc4b3..70756b0 100644
--- a/src/functionalTest/java/ch/fhnw/thga/gradleplugins/FregePluginFunctionalTest.java
+++ b/src/functionalTest/java/ch/fhnw/thga/gradleplugins/FregePluginFunctionalTest.java
@@ -1,11 +1,7 @@
package ch.fhnw.thga.gradleplugins;
import static ch.fhnw.thga.gradleplugins.FregeExtension.DEFAULT_DOWNLOAD_DIRECTORY;
-import static ch.fhnw.thga.gradleplugins.FregePlugin.COMPILE_FREGE_TASK_NAME;
-import static ch.fhnw.thga.gradleplugins.FregePlugin.FREGE_EXTENSION_NAME;
-import static ch.fhnw.thga.gradleplugins.FregePlugin.FREGE_PLUGIN_ID;
-import static ch.fhnw.thga.gradleplugins.FregePlugin.RUN_FREGE_TASK_NAME;
-import static ch.fhnw.thga.gradleplugins.FregePlugin.SETUP_FREGE_TASK_NAME;
+import static ch.fhnw.thga.gradleplugins.FregePlugin.*;
import static ch.fhnw.thga.gradleplugins.GradleBuildFileConversionTest.createPluginsSection;
import static org.gradle.testkit.runner.TaskOutcome.FAILED;
import static org.gradle.testkit.runner.TaskOutcome.FROM_CACHE;
@@ -33,6 +29,7 @@ import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.DisplayNameGenerator;
import org.junit.jupiter.api.IndicativeSentencesGeneration;
import org.junit.jupiter.api.Nested;
+import org.junit.jupiter.api.Tag;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.TestInstance;
import org.junit.jupiter.api.TestInstance.Lifecycle;
@@ -356,4 +353,22 @@ public class FregePluginFunctionalTest {
assertTrue(result.getOutput().contains("Frege rocks"));
}
}
+
+ @Nested
+ @TestInstance(Lifecycle.PER_CLASS)
+ @IndicativeSentencesGeneration(separator = " -> ", generator = DisplayNameGenerator.ReplaceUnderscores.class)
+ class Repl_frege_task_works {
+ @Test
+ @Tag("hard")
+ void given_minimal_build_file_config() throws Exception {
+ Files.createDirectories(testProjectDir.toPath().resolve(Paths.get("src", "main", "frege")));
+ String minimalBuildFileConfig = createFregeSection(
+ fregeBuilder.version("'3.25.84'").release("'3.25alpha'").build());
+ appendToFile(buildFile, minimalBuildFileConfig);
+
+ BuildResult result = runGradleTask(REPL_FREGE_TASK_NAME);
+ assertTrue(project.getTasks().getByName(REPL_FREGE_TASK_NAME) instanceof ReplFregeTask);
+ assertEquals(SUCCESS, result.task(":" + REPL_FREGE_TASK_NAME).getOutcome());
+ }
+ }
} \ No newline at end of file