Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -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")

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,12 @@ 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.{
ExitException,
InvalidArgument,
InvalidFormatSpecified,
JellySerializationError,
}
import eu.ostrzyciel.jelly.convert.jena.riot.JellyLanguage
import eu.ostrzyciel.jelly.core.proto.v1.{LogicalStreamType, RdfStreamFrame}
import eu.ostrzyciel.jelly.core.{IoUtils, JellyOptions}
Expand Down Expand Up @@ -397,6 +402,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] {
Expand All @@ -408,6 +414,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] {
Expand All @@ -419,5 +426,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)
}
}
}
Loading