2021-06-19 16:10:26 +00:00
|
|
|
package prog8tests
|
|
|
|
|
2021-10-12 21:54:48 +00:00
|
|
|
import com.github.michaelbull.result.getErrorOrElse
|
|
|
|
import com.github.michaelbull.result.getOrElse
|
2021-08-01 15:24:12 +00:00
|
|
|
import org.hamcrest.MatcherAssert.assertThat
|
2021-10-26 22:05:46 +00:00
|
|
|
import org.hamcrest.Matchers.equalTo
|
|
|
|
import org.hamcrest.Matchers.nullValue
|
2021-10-11 19:20:57 +00:00
|
|
|
import org.hamcrest.core.Is
|
2021-06-19 16:10:26 +00:00
|
|
|
import prog8.ast.Program
|
2021-10-19 19:49:05 +00:00
|
|
|
import prog8.ast.internedStringsModuleName
|
2021-08-02 07:15:11 +00:00
|
|
|
import prog8.compiler.ModuleImporter
|
2021-10-29 03:28:02 +00:00
|
|
|
import prog8.compilerinterface.IErrorReporter
|
2021-10-10 22:22:04 +00:00
|
|
|
import prog8.parser.ParseError
|
2021-10-16 12:26:33 +00:00
|
|
|
import prog8.parser.SourceCode
|
2021-10-29 03:00:30 +00:00
|
|
|
import prog8tests.ast.helpers.*
|
2021-10-29 03:28:02 +00:00
|
|
|
import prog8tests.helpers.ErrorReporterForTests
|
2021-10-29 14:20:53 +00:00
|
|
|
import prog8tests.helpers.DummyFunctions
|
|
|
|
import prog8tests.helpers.DummyMemsizer
|
2021-10-29 22:05:55 +00:00
|
|
|
import prog8tests.helpers.DummyStringEncoder
|
2021-10-10 22:22:04 +00:00
|
|
|
import kotlin.io.path.*
|
2021-11-07 23:16:58 +00:00
|
|
|
import io.kotest.assertions.fail
|
|
|
|
import io.kotest.assertions.throwables.shouldThrow
|
|
|
|
import io.kotest.assertions.withClue
|
|
|
|
import io.kotest.core.spec.style.FunSpec
|
|
|
|
import io.kotest.matchers.collections.shouldBeIn
|
|
|
|
import io.kotest.matchers.shouldBe
|
|
|
|
import io.kotest.matchers.string.shouldContain
|
2021-07-18 17:02:47 +00:00
|
|
|
|
2021-06-19 16:10:26 +00:00
|
|
|
|
2021-11-07 23:16:58 +00:00
|
|
|
class TestModuleImporter: FunSpec({
|
|
|
|
val count = listOf("1st", "2nd", "3rd", "4th", "5th")
|
2021-07-18 17:02:47 +00:00
|
|
|
|
2021-11-07 23:16:58 +00:00
|
|
|
lateinit var program: Program
|
|
|
|
|
|
|
|
beforeTest {
|
2021-10-29 22:05:55 +00:00
|
|
|
program = Program("foo", DummyFunctions, DummyMemsizer, DummyStringEncoder)
|
2021-08-01 15:24:12 +00:00
|
|
|
}
|
|
|
|
|
2021-11-07 23:16:58 +00:00
|
|
|
fun makeImporter(errors: IErrorReporter? = null, searchIn: Iterable<String>) =
|
|
|
|
ModuleImporter(program, "blah", errors ?: ErrorReporterForTests(false), searchIn.toList())
|
|
|
|
|
|
|
|
fun makeImporter(errors: IErrorReporter?, vararg searchIn: String): ModuleImporter {
|
2021-10-11 19:20:57 +00:00
|
|
|
return makeImporter(errors, searchIn.asList())
|
|
|
|
}
|
2021-08-01 15:24:12 +00:00
|
|
|
|
2021-11-07 23:16:58 +00:00
|
|
|
context("Constructor") {
|
2021-07-18 17:02:47 +00:00
|
|
|
|
2021-11-07 23:16:58 +00:00
|
|
|
//Disabled("TODO: invalid entries in search list")
|
|
|
|
xtest("testInvalidEntriesInSearchList") {
|
|
|
|
}
|
2021-07-18 17:02:47 +00:00
|
|
|
|
2021-11-07 23:16:58 +00:00
|
|
|
//Disabled("TODO: literal duplicates in search list")
|
|
|
|
xtest("testLiteralDuplicatesInSearchList") {
|
|
|
|
}
|
2021-08-01 13:15:54 +00:00
|
|
|
|
2021-11-07 23:16:58 +00:00
|
|
|
//Disabled("TODO: factual duplicates in search list")
|
|
|
|
xtest("testFactualDuplicatesInSearchList") {
|
|
|
|
}
|
2021-07-18 17:02:47 +00:00
|
|
|
}
|
|
|
|
|
2021-11-07 23:16:58 +00:00
|
|
|
context("ImportModule") {
|
2021-06-19 18:45:37 +00:00
|
|
|
|
2021-11-07 23:16:58 +00:00
|
|
|
context("WithInvalidPath") {
|
|
|
|
test("testNonexisting") {
|
2021-08-01 13:15:54 +00:00
|
|
|
val dirRel = assumeDirectory(".", workingDir.relativize(fixturesDir))
|
2021-10-11 19:20:57 +00:00
|
|
|
val importer = makeImporter(null, dirRel.invariantSeparatorsPathString)
|
2021-08-01 13:15:54 +00:00
|
|
|
val srcPathRel = assumeNotExists(dirRel, "i_do_not_exist")
|
|
|
|
val srcPathAbs = srcPathRel.absolute()
|
2021-10-12 21:54:48 +00:00
|
|
|
val error1 = importer.importModule(srcPathRel).getErrorOrElse { fail("should have import error") }
|
|
|
|
assertThat(
|
|
|
|
".file should be normalized",
|
|
|
|
"${error1.file}", equalTo("${error1.file.normalize()}")
|
|
|
|
)
|
|
|
|
assertThat(
|
|
|
|
".file should point to specified path",
|
|
|
|
error1.file.absolutePath, equalTo("${srcPathAbs.normalize()}")
|
|
|
|
)
|
2021-08-01 15:24:12 +00:00
|
|
|
assertThat(program.modules.size, equalTo(1))
|
2021-08-01 13:15:54 +00:00
|
|
|
|
2021-10-12 21:54:48 +00:00
|
|
|
val error2 = importer.importModule(srcPathAbs).getErrorOrElse { fail("should have import error") }
|
|
|
|
assertThat(
|
|
|
|
".file should be normalized",
|
|
|
|
"${error2.file}", equalTo("${error2.file.normalize()}")
|
|
|
|
)
|
|
|
|
assertThat(
|
|
|
|
".file should point to specified path",
|
|
|
|
error2.file.absolutePath, equalTo("${srcPathAbs.normalize()}")
|
|
|
|
)
|
2021-08-01 15:24:12 +00:00
|
|
|
assertThat(program.modules.size, equalTo(1))
|
2021-07-18 17:02:47 +00:00
|
|
|
}
|
2021-06-19 18:45:37 +00:00
|
|
|
|
2021-11-07 23:16:58 +00:00
|
|
|
test("testDirectory") {
|
2021-08-01 20:47:11 +00:00
|
|
|
val srcPathRel = assumeDirectory(workingDir.relativize(fixturesDir))
|
2021-08-01 13:15:54 +00:00
|
|
|
val srcPathAbs = srcPathRel.absolute()
|
2021-08-01 20:47:11 +00:00
|
|
|
val searchIn = Path(".", "$srcPathRel").invariantSeparatorsPathString
|
2021-10-11 19:20:57 +00:00
|
|
|
val importer = makeImporter(null, searchIn)
|
2021-08-01 13:15:54 +00:00
|
|
|
|
2021-11-07 23:16:58 +00:00
|
|
|
shouldThrow<AccessDeniedException> { importer.importModule(srcPathRel) }
|
2021-08-01 13:15:54 +00:00
|
|
|
.let {
|
|
|
|
assertThat(
|
|
|
|
".file should be normalized",
|
2021-08-01 15:24:12 +00:00
|
|
|
"${it.file}", equalTo("${it.file.normalize()}")
|
2021-08-01 13:15:54 +00:00
|
|
|
)
|
|
|
|
assertThat(
|
|
|
|
".file should point to specified path",
|
2021-08-01 15:24:12 +00:00
|
|
|
it.file.absolutePath, equalTo("${srcPathAbs.normalize()}")
|
2021-08-01 13:15:54 +00:00
|
|
|
)
|
|
|
|
}
|
2021-08-01 15:24:12 +00:00
|
|
|
assertThat(program.modules.size, equalTo(1))
|
2021-08-01 13:15:54 +00:00
|
|
|
|
2021-11-07 23:16:58 +00:00
|
|
|
shouldThrow<AccessDeniedException> { importer.importModule(srcPathAbs) }
|
2021-08-01 13:15:54 +00:00
|
|
|
.let {
|
|
|
|
assertThat(
|
|
|
|
".file should be normalized",
|
2021-08-01 15:24:12 +00:00
|
|
|
"${it.file}", equalTo("${it.file.normalize()}")
|
2021-08-01 13:15:54 +00:00
|
|
|
)
|
|
|
|
assertThat(
|
|
|
|
".file should point to specified path",
|
2021-08-01 15:24:12 +00:00
|
|
|
it.file.absolutePath, equalTo("${srcPathAbs.normalize()}")
|
2021-08-01 13:15:54 +00:00
|
|
|
)
|
|
|
|
}
|
2021-08-01 15:24:12 +00:00
|
|
|
assertThat(program.modules.size, equalTo(1))
|
2021-07-18 17:02:47 +00:00
|
|
|
}
|
2021-06-19 16:10:26 +00:00
|
|
|
}
|
|
|
|
|
2021-11-07 23:16:58 +00:00
|
|
|
context("WithValidPath") {
|
2021-08-01 13:15:54 +00:00
|
|
|
|
2021-11-07 23:16:58 +00:00
|
|
|
test("testAbsolute") {
|
2021-08-01 13:15:54 +00:00
|
|
|
val searchIn = listOf(
|
|
|
|
Path(".").div(workingDir.relativize(fixturesDir)), // we do want a dot "." in front
|
|
|
|
).map { it.invariantSeparatorsPathString }
|
2021-10-11 19:20:57 +00:00
|
|
|
val importer = makeImporter(null, searchIn)
|
2021-08-01 13:15:54 +00:00
|
|
|
val fileName = "simple_main.p8"
|
|
|
|
val path = assumeReadableFile(searchIn[0], fileName)
|
|
|
|
|
2021-10-12 21:54:48 +00:00
|
|
|
val module = importer.importModule(path.absolute()).getOrElse { throw it }
|
2021-08-01 15:24:12 +00:00
|
|
|
assertThat(program.modules.size, equalTo(2))
|
2021-11-07 23:16:58 +00:00
|
|
|
module shouldBeIn program.modules
|
2021-08-01 15:24:12 +00:00
|
|
|
assertThat(module.program, equalTo(program))
|
2021-08-01 13:15:54 +00:00
|
|
|
}
|
|
|
|
|
2021-11-07 23:16:58 +00:00
|
|
|
test("testRelativeToWorkingDir") {
|
2021-08-01 13:15:54 +00:00
|
|
|
val searchIn = listOf(
|
|
|
|
Path(".").div(workingDir.relativize(fixturesDir)), // we do want a dot "." in front
|
|
|
|
).map { it.invariantSeparatorsPathString }
|
2021-10-11 19:20:57 +00:00
|
|
|
val importer = makeImporter(null, searchIn)
|
2021-08-01 13:15:54 +00:00
|
|
|
val fileName = "simple_main.p8"
|
|
|
|
val path = assumeReadableFile(searchIn[0], fileName)
|
2021-08-01 15:24:12 +00:00
|
|
|
assertThat("sanity check: path should NOT be absolute", path.isAbsolute, equalTo(false))
|
2021-08-01 13:15:54 +00:00
|
|
|
|
2021-10-12 21:54:48 +00:00
|
|
|
val module = importer.importModule(path).getOrElse { throw it }
|
2021-08-01 15:24:12 +00:00
|
|
|
assertThat(program.modules.size, equalTo(2))
|
2021-11-07 23:16:58 +00:00
|
|
|
module shouldBeIn program.modules
|
2021-08-01 15:24:12 +00:00
|
|
|
assertThat(module.program, equalTo(program))
|
2021-08-01 13:15:54 +00:00
|
|
|
}
|
|
|
|
|
2021-11-07 23:16:58 +00:00
|
|
|
test("testRelativeTo1stDirInSearchList") {
|
2021-08-01 15:24:12 +00:00
|
|
|
val searchIn = Path(".")
|
|
|
|
.div(workingDir.relativize(fixturesDir))
|
|
|
|
.invariantSeparatorsPathString
|
2021-10-11 19:20:57 +00:00
|
|
|
val importer = makeImporter(null, searchIn)
|
2021-08-01 13:15:54 +00:00
|
|
|
val fileName = "simple_main.p8"
|
|
|
|
val path = Path(".", fileName)
|
2021-08-01 15:24:12 +00:00
|
|
|
assumeReadableFile(searchIn, path)
|
2021-08-01 13:15:54 +00:00
|
|
|
|
2021-10-12 21:54:48 +00:00
|
|
|
val module = importer.importModule(path).getOrElse { throw it }
|
2021-08-01 15:24:12 +00:00
|
|
|
assertThat(program.modules.size, equalTo(2))
|
2021-11-07 23:16:58 +00:00
|
|
|
module shouldBeIn program.modules
|
2021-08-01 15:24:12 +00:00
|
|
|
assertThat(module.program, equalTo(program))
|
2021-07-18 17:02:47 +00:00
|
|
|
}
|
2021-06-19 18:27:04 +00:00
|
|
|
|
2021-11-07 23:16:58 +00:00
|
|
|
//Disabled("TODO: relative to 2nd in search list")
|
|
|
|
xtest("testRelativeTo2ndDirInSearchList") {}
|
2021-08-01 13:15:54 +00:00
|
|
|
|
2021-11-07 23:16:58 +00:00
|
|
|
//Disabled("TODO: ambiguous - 2 or more really different candidates")
|
|
|
|
xtest("testAmbiguousCandidates") {}
|
2021-08-01 13:15:54 +00:00
|
|
|
|
2021-11-07 23:16:58 +00:00
|
|
|
context("WithBadFile") {
|
|
|
|
test("testWithSyntaxError") {
|
2021-08-01 15:24:12 +00:00
|
|
|
val searchIn = assumeDirectory("./", workingDir.relativize(fixturesDir))
|
2021-10-11 19:20:57 +00:00
|
|
|
val importer = makeImporter(null, searchIn.invariantSeparatorsPathString)
|
2021-08-01 13:15:54 +00:00
|
|
|
val srcPath = assumeReadableFile(fixturesDir, "file_with_syntax_error.p8")
|
|
|
|
|
|
|
|
val act = { importer.importModule(srcPath) }
|
|
|
|
|
2021-11-07 23:16:58 +00:00
|
|
|
repeat(2) { n -> withClue(count[n] + " call") {
|
|
|
|
shouldThrow<ParseError>() { act() }.let {
|
|
|
|
assertThat(it.position.file, equalTo(SourceCode.relative(srcPath).toString()))
|
|
|
|
assertThat("line; should be 1-based", it.position.line, equalTo(2))
|
|
|
|
assertThat("startCol; should be 0-based", it.position.startCol, equalTo(6))
|
|
|
|
assertThat("endCol; should be 0-based", it.position.endCol, equalTo(6))
|
|
|
|
}
|
2021-08-01 13:15:54 +00:00
|
|
|
}
|
2021-08-01 15:24:12 +00:00
|
|
|
assertThat(program.modules.size, equalTo(1))
|
2021-08-01 13:15:54 +00:00
|
|
|
}
|
2021-07-18 17:02:47 +00:00
|
|
|
}
|
2021-08-01 13:15:54 +00:00
|
|
|
|
2021-11-07 23:16:58 +00:00
|
|
|
fun doTestImportingFileWithSyntaxError(repetitions: Int) {
|
2021-08-01 15:24:12 +00:00
|
|
|
val searchIn = assumeDirectory("./", workingDir.relativize(fixturesDir))
|
2021-10-11 19:20:57 +00:00
|
|
|
val importer = makeImporter(null, searchIn.invariantSeparatorsPathString)
|
2021-08-01 13:15:54 +00:00
|
|
|
val importing = assumeReadableFile(fixturesDir, "import_file_with_syntax_error.p8")
|
|
|
|
val imported = assumeReadableFile(fixturesDir, "file_with_syntax_error.p8")
|
|
|
|
|
|
|
|
val act = { importer.importModule(importing) }
|
|
|
|
|
2021-11-07 23:16:58 +00:00
|
|
|
repeat(repetitions) { n -> withClue(count[n] + " call") {
|
|
|
|
shouldThrow<ParseError>() { act() }.let {
|
2021-10-16 12:26:33 +00:00
|
|
|
assertThat(it.position.file, equalTo(SourceCode.relative(imported).toString()))
|
2021-08-01 15:24:12 +00:00
|
|
|
assertThat("line; should be 1-based", it.position.line, equalTo(2))
|
|
|
|
assertThat("startCol; should be 0-based", it.position.startCol, equalTo(6))
|
|
|
|
assertThat("endCol; should be 0-based", it.position.endCol, equalTo(6))
|
2021-08-01 13:15:54 +00:00
|
|
|
}
|
2021-11-07 23:16:58 +00:00
|
|
|
}
|
2021-10-19 19:49:05 +00:00
|
|
|
assertThat("imported module with error in it should not be present", program.modules.size, equalTo(1))
|
|
|
|
assertThat(program.modules[0].name, equalTo(internedStringsModuleName))
|
2021-08-01 13:15:54 +00:00
|
|
|
}
|
2021-07-18 17:02:47 +00:00
|
|
|
}
|
2021-11-07 23:16:58 +00:00
|
|
|
|
|
|
|
test("testImportingFileWithSyntaxError_once") {
|
|
|
|
doTestImportingFileWithSyntaxError(1)
|
|
|
|
}
|
|
|
|
|
|
|
|
test("testImportingFileWithSyntaxError_twice") {
|
|
|
|
doTestImportingFileWithSyntaxError(2)
|
|
|
|
}
|
2021-08-01 13:15:54 +00:00
|
|
|
}
|
2021-07-18 17:02:47 +00:00
|
|
|
}
|
2021-06-21 10:02:36 +00:00
|
|
|
}
|
2021-06-19 18:27:04 +00:00
|
|
|
|
2021-11-07 23:16:58 +00:00
|
|
|
context("ImportLibraryModule") {
|
|
|
|
context("WithInvalidName") {
|
|
|
|
test("testWithNonExistingName") {
|
2021-08-01 15:24:12 +00:00
|
|
|
val searchIn = assumeDirectory("./", workingDir.relativize(fixturesDir))
|
2021-10-21 23:25:26 +00:00
|
|
|
val errors = ErrorReporterForTests(false)
|
2021-10-11 19:20:57 +00:00
|
|
|
val importer = makeImporter(errors, searchIn.invariantSeparatorsPathString)
|
2021-08-01 13:15:54 +00:00
|
|
|
val filenameNoExt = assumeNotExists(fixturesDir, "i_do_not_exist").name
|
|
|
|
val filenameWithExt = assumeNotExists(fixturesDir, "i_do_not_exist.p8").name
|
|
|
|
|
|
|
|
repeat(2) { n ->
|
2021-10-11 19:20:57 +00:00
|
|
|
val result = importer.importLibraryModule(filenameNoExt)
|
|
|
|
assertThat(count[n] + " call / NO .p8 extension", result, Is(nullValue()))
|
2021-11-07 23:16:58 +00:00
|
|
|
withClue(count[n] + " call / NO .p8 extension") {
|
|
|
|
errors.noErrors() shouldBe false
|
|
|
|
}
|
|
|
|
errors.errors.single() shouldContain "0:0: no module found with name i_do_not_exist"
|
2021-10-11 19:20:57 +00:00
|
|
|
errors.report()
|
2021-08-01 15:24:12 +00:00
|
|
|
assertThat(program.modules.size, equalTo(1))
|
|
|
|
|
2021-10-11 19:20:57 +00:00
|
|
|
val result2 = importer.importLibraryModule(filenameWithExt)
|
|
|
|
assertThat(count[n] + " call / with .p8 extension", result2, Is(nullValue()))
|
2021-11-07 23:16:58 +00:00
|
|
|
withClue(count[n] + " call / with .p8 extension") {
|
|
|
|
importer.errors.noErrors() shouldBe false
|
|
|
|
}
|
|
|
|
errors.errors.single() shouldContain "0:0: no module found with name i_do_not_exist.p8"
|
2021-10-11 19:20:57 +00:00
|
|
|
errors.report()
|
2021-08-01 15:24:12 +00:00
|
|
|
assertThat(program.modules.size, equalTo(1))
|
2021-07-18 17:02:47 +00:00
|
|
|
}
|
2021-08-01 13:15:54 +00:00
|
|
|
}
|
2021-06-19 18:27:04 +00:00
|
|
|
}
|
|
|
|
|
2021-11-07 23:16:58 +00:00
|
|
|
context("WithValidName") {
|
|
|
|
context("WithBadFile") {
|
|
|
|
test("testWithSyntaxError") {
|
2021-08-01 15:24:12 +00:00
|
|
|
val searchIn = assumeDirectory("./", workingDir.relativize(fixturesDir))
|
2021-10-11 19:20:57 +00:00
|
|
|
val importer = makeImporter(null, searchIn.invariantSeparatorsPathString)
|
2021-08-01 13:15:54 +00:00
|
|
|
val srcPath = assumeReadableFile(fixturesDir, "file_with_syntax_error.p8")
|
|
|
|
|
2021-11-07 23:16:58 +00:00
|
|
|
repeat(2) { n -> withClue(count[n] + " call") {
|
|
|
|
shouldThrow<ParseError>()
|
|
|
|
{
|
|
|
|
importer.importLibraryModule(srcPath.nameWithoutExtension) }.let {
|
2021-10-16 12:26:33 +00:00
|
|
|
assertThat(it.position.file, equalTo(SourceCode.relative(srcPath).toString()))
|
2021-08-01 15:24:12 +00:00
|
|
|
assertThat("line; should be 1-based", it.position.line, equalTo(2))
|
|
|
|
assertThat("startCol; should be 0-based", it.position.startCol, equalTo(6))
|
|
|
|
assertThat("endCol; should be 0-based", it.position.endCol, equalTo(6))
|
|
|
|
}
|
2021-11-07 23:16:58 +00:00
|
|
|
}
|
2021-08-01 15:24:12 +00:00
|
|
|
assertThat(program.modules.size, equalTo(1))
|
2021-08-01 13:15:54 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-08-01 14:26:27 +00:00
|
|
|
|
2021-11-07 23:16:58 +00:00
|
|
|
fun doTestImportingFileWithSyntaxError(repetitions: Int) {
|
2021-08-01 15:24:12 +00:00
|
|
|
val searchIn = assumeDirectory("./", workingDir.relativize(fixturesDir))
|
2021-10-11 19:20:57 +00:00
|
|
|
val importer = makeImporter(null, searchIn.invariantSeparatorsPathString)
|
2021-08-01 13:15:54 +00:00
|
|
|
val importing = assumeReadableFile(fixturesDir, "import_file_with_syntax_error.p8")
|
|
|
|
val imported = assumeReadableFile(fixturesDir, "file_with_syntax_error.p8")
|
|
|
|
|
|
|
|
val act = { importer.importLibraryModule(importing.nameWithoutExtension) }
|
|
|
|
|
2021-11-07 23:16:58 +00:00
|
|
|
repeat(repetitions) { n -> withClue(count[n] + " call") {
|
|
|
|
shouldThrow<ParseError>() {
|
|
|
|
act() }.let {
|
|
|
|
assertThat(it.position.file, equalTo(SourceCode.relative(imported).toString()))
|
|
|
|
assertThat("line; should be 1-based", it.position.line, equalTo(2))
|
|
|
|
assertThat("startCol; should be 0-based", it.position.startCol, equalTo(6))
|
|
|
|
assertThat("endCol; should be 0-based", it.position.endCol, equalTo(6))
|
|
|
|
}
|
2021-08-01 13:15:54 +00:00
|
|
|
}
|
2021-10-19 19:49:05 +00:00
|
|
|
assertThat("imported module with error in it should not be present", program.modules.size, equalTo(1))
|
|
|
|
assertThat(program.modules[0].name, equalTo(internedStringsModuleName))
|
2021-10-13 18:26:35 +00:00
|
|
|
importer.errors.report()
|
2021-08-01 13:15:54 +00:00
|
|
|
}
|
|
|
|
}
|
2021-08-01 14:26:27 +00:00
|
|
|
|
2021-11-07 23:16:58 +00:00
|
|
|
test("testImportingFileWithSyntaxError_once") {
|
2021-08-01 14:26:27 +00:00
|
|
|
doTestImportingFileWithSyntaxError(1)
|
|
|
|
}
|
|
|
|
|
2021-11-07 23:16:58 +00:00
|
|
|
test("testImportingFileWithSyntaxError_twice") {
|
2021-08-01 14:26:27 +00:00
|
|
|
doTestImportingFileWithSyntaxError(2)
|
|
|
|
}
|
2021-07-18 17:02:47 +00:00
|
|
|
}
|
2021-06-19 16:10:26 +00:00
|
|
|
}
|
|
|
|
}
|
2021-11-07 23:16:58 +00:00
|
|
|
})
|