diff --git a/build.sbt b/build.sbt index e145318..64ce478 100644 --- a/build.sbt +++ b/build.sbt @@ -6,7 +6,7 @@ resolvers += "Sonatype OSS Snapshots" at "https://s01.oss.sonatype.org/content/repositories/snapshots" lazy val jenaV = "5.3.0" -lazy val jellyV = "2.10.2" +lazy val jellyV = "2.10.3" addCommandAlias("fixAll", "scalafixAll; scalafmtAll") diff --git a/src/test/scala/eu/neverblink/jelly/cli/command/rdf/RdfToJellySpec.scala b/src/test/scala/eu/neverblink/jelly/cli/command/rdf/RdfToJellySpec.scala index 21de0b8..ba86faa 100644 --- a/src/test/scala/eu/neverblink/jelly/cli/command/rdf/RdfToJellySpec.scala +++ b/src/test/scala/eu/neverblink/jelly/cli/command/rdf/RdfToJellySpec.scala @@ -2,7 +2,7 @@ package eu.neverblink.jelly.cli.command.rdf import eu.neverblink.jelly.cli.command.helpers.{DataGenHelper, TestFixtureHelper} import eu.neverblink.jelly.cli.command.rdf.util.RdfFormat -import eu.neverblink.jelly.cli.{ExitException, InvalidArgument, InvalidFormatSpecified} +import eu.neverblink.jelly.cli.* import eu.ostrzyciel.jelly.convert.jena.riot.JellyLanguage import eu.ostrzyciel.jelly.core.proto.v1.{LogicalStreamType, RdfStreamFrame} import eu.ostrzyciel.jelly.core.{IoUtils, JellyOptions} @@ -397,6 +397,7 @@ class RdfToJellySpec extends AnyWordSpec with TestFixtureHelper with Matchers: cause.validFormats should be(RdfToJellyPrint.validFormatsString) cause.format should be("invalid") } + "invalid format out of existing is specified" in withFullJenaFile { f => val e = intercept[ExitException] { @@ -408,6 +409,7 @@ class RdfToJellySpec extends AnyWordSpec with TestFixtureHelper with Matchers: cause.validFormats should be(RdfToJellyPrint.validFormatsString) cause.format should be("jelly") } + "invalid logical stream type is specified" in withFullJenaFile { f => val e = intercept[ExitException] { @@ -419,5 +421,15 @@ class RdfToJellySpec extends AnyWordSpec with TestFixtureHelper with Matchers: cause.argumentValue should be("test") e.code should be(1) } + + "name table with size < 8 specified" in withFullJenaFile { f => + val e = intercept[ExitException] { + RdfToJelly.runTestCommand(List("rdf", "to-jelly", f, "--opt.max-name-table-size=5")) + } + e.cause.get shouldBe a[JellySerializationError] + val cause = e.cause.get.asInstanceOf[JellySerializationError] + cause.message should include("name table size of 5 ") + e.code should be(1) + } } }