diff --git a/VERSION b/VERSION index 845639e..0ea3a94 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.1.4 +0.2.0 diff --git a/config/config.exs b/config/config.exs index 5977547..a922c7c 100644 --- a/config/config.exs +++ b/config/config.exs @@ -1,6 +1,6 @@ # This file is responsible for configuring your application # and its dependencies with the aid of the Mix.Config module. -use Mix.Config +import Config # This configuration is loaded before any dependency and is restricted # to this project. If another project depends on this project, this diff --git a/lib/shex/operator.ex b/lib/shex/operator.ex index cef9cd8..a7faf86 100644 --- a/lib/shex/operator.ex +++ b/lib/shex/operator.ex @@ -13,7 +13,7 @@ defmodule ShEx.Operator.Shared do end child, _ -> - case ShEx.Operator.check(child, fun) do + case ShEx.Operator.Shared.check(child, fun) do :ok -> {:cont, :ok} fail -> {:halt, fail} end @@ -28,6 +28,4 @@ defprotocol ShEx.Operator do def children(operator) def triple_expression_label_and_operands(operator) - - defdelegate check(operator, fun), to: ShEx.Operator.Shared end diff --git a/lib/shex/schema.ex b/lib/shex/schema.ex index 43990e0..624ce81 100644 --- a/lib/shex/schema.ex +++ b/lib/shex/schema.ex @@ -19,8 +19,8 @@ defmodule ShEx.Schema do alias ShEx.{ShapeMap, ShapeExpression} - @parallel_default Application.get_env(:shex, :parallel) - @flow_opts_defaults Application.get_env(:shex, :flow_opts) + @parallel_default Application.compile_env(:shex, :parallel) + @flow_opts_defaults Application.compile_env(:shex, :flow_opts) @flow_opts MapSet.new(~w[max_demand min_demand stages window buffer_keep buffer_size]a) @doc !""" @@ -103,12 +103,12 @@ defmodule ShEx.Schema do defp use_parallelization?(parallel, _), do: parallel - defp flow_opts_defaults(shape_map, data, opts) do + defp flow_opts_defaults(_shape_map, _data, _opts) do @flow_opts_defaults || [max_demand: 3] end defp check_refs(schema, labeled_triple_expressions) do - ShEx.Operator.check(schema, fn + ShEx.Operator.Shared.check(schema, fn {:shape_expression_label, id} -> if schema.shapes[id] do :ok diff --git a/lib/shex/shape_expressions/node_constraint.ex b/lib/shex/shape_expressions/node_constraint.ex index 908d1a6..af26138 100644 --- a/lib/shex/shape_expressions/node_constraint.ex +++ b/lib/shex/shape_expressions/node_constraint.ex @@ -16,7 +16,7 @@ defmodule ShEx.NodeConstraint do :values ] - alias RDF.{IRI, BlankNode, Literal, XSD, NS} + alias RDF.{IRI, BlankNode, Literal, XSD} @node_kinds ~w[iri bnode nonliteral literal] diff --git a/lib/shex/shape_expressions/shape.ex b/lib/shex/shape_expressions/shape.ex index c37b8d3..afdf112 100644 --- a/lib/shex/shape_expressions/shape.ex +++ b/lib/shex/shape_expressions/shape.ex @@ -25,8 +25,8 @@ defmodule ShEx.Shape do # having currently no index on the triple objects, we do this only when # necessary, i.e. when inverse triple expressions exist. arcs_in = - unless shape.expression && - ShEx.TripleExpression.required_arcs(shape.expression, state) == {:arcs_out} do + if !(shape.expression && + ShEx.TripleExpression.required_arcs(shape.expression, state) == {:arcs_out}) do arcs_in(graph, node) end diff --git a/lib/shex/shape_map.ex b/lib/shex/shape_map.ex index 1dccee5..f7d6e02 100644 --- a/lib/shex/shape_map.ex +++ b/lib/shex/shape_map.ex @@ -143,7 +143,7 @@ defmodule ShEx.ShapeMap do do: association @doc false - def violation(%__MODULE__{} = association, reasons, app_infos \\ nil) do + def violation(%__MODULE__{} = association, reasons, _app_infos \\ nil) do %__MODULE__{ association | status: :nonconformant, diff --git a/lib/shex/shape_map/decoder.ex b/lib/shex/shape_map/decoder.ex index 24d84b3..70f87f0 100644 --- a/lib/shex/shape_map/decoder.ex +++ b/lib/shex/shape_map/decoder.ex @@ -30,7 +30,7 @@ defmodule ShEx.ShapeMap.Decoder do defp error_description(error_descriptor), do: inspect(error_descriptor) - defp tokenize(content), do: content |> to_charlist |> :shape_map_lexer.string() + defp tokenize(content), do: content |> to_charlist() |> :shape_map_lexer.string() defp parse([]), do: {:ok, []} defp parse(tokens), do: tokens |> :shape_map_parser.parse() diff --git a/lib/shex/shexc/decoder.ex b/lib/shex/shexc/decoder.ex index a235e23..daacd6b 100644 --- a/lib/shex/shexc/decoder.ex +++ b/lib/shex/shexc/decoder.ex @@ -38,7 +38,7 @@ defmodule ShEx.ShExC.Decoder do end end - defp tokenize(content), do: content |> to_charlist |> :shexc_lexer.string() + defp tokenize(content), do: content |> to_charlist() |> :shexc_lexer.string() defp parse([]), do: {:ok, []} defp parse(tokens), do: tokens |> :shexc_parser.parse() @@ -64,9 +64,9 @@ defmodule ShEx.ShExC.Decoder do end end) do ShEx.Schema.new( - unless(Enum.empty?(shapes), do: Enum.reverse(shapes)), + if(!Enum.empty?(shapes), do: Enum.reverse(shapes)), start, - unless(Enum.empty?(imports), do: imports), + if(!Enum.empty?(imports), do: imports), start_acts ) end @@ -201,7 +201,7 @@ defmodule ShEx.ShExC.Decoder do %ShEx.Shape{ expression: triple_expression, closed: closed, - extra: unless(Enum.empty?(extra), do: extra), + extra: if(!Enum.empty?(extra), do: extra), sem_acts: sem_acts, annotations: annotations }} diff --git a/lib/shex/shexc/parse_helper.ex b/lib/shex/shexc/parse_helper.ex index f9316d8..ec4d79a 100644 --- a/lib/shex/shexc/parse_helper.ex +++ b/lib/shex/shexc/parse_helper.ex @@ -4,10 +4,10 @@ defmodule ShEx.ShExC.ParseHelper do import RDF.Serialization.ParseHelper def code_str(value), - do: value |> to_str() |> String.slice(1..-3) + do: value |> to_str() |> String.slice(1..-3//-1) def repeat_range(value) do - content = value |> to_str() |> String.slice(1..-2) + content = value |> to_str() |> String.slice(1..-2//-1) case content |> String.split(",") |> Enum.map(&range_member/1) do [lower, upper] -> {lower, upper} @@ -21,21 +21,21 @@ defmodule ShEx.ShExC.ParseHelper do def to_str(value), do: List.to_string(value) - def lang_quoted_content_str('"' ++ value), + def lang_quoted_content_str(~c'"' ++ value), do: value |> to_str() |> split_lang_from_string(~s["]) - def lang_quoted_content_str('\'' ++ value), + def lang_quoted_content_str(~c"'" ++ value), do: value |> to_str() |> split_lang_from_string("'") - def lang_long_quoted_content_str('"""' ++ value), + def lang_long_quoted_content_str(~c'"""' ++ value), do: value |> to_str() |> split_lang_from_string(~s["""]) - def lang_long_quoted_content_str('\'\'\'' ++ value), + def lang_long_quoted_content_str(~c"'''" ++ value), do: value |> to_str() |> split_lang_from_string("'''") defp split_lang_from_string(str, quotes), do: str |> String.split(quotes <> "@") |> List.to_tuple() def to_lang_literal({:lang_string_literal_quote, _line, {value, language}}), - do: value |> string_unescape |> RDF.literal(language: language) + do: value |> string_unescape() |> RDF.literal(language: language) end diff --git a/lib/shex/shexj/decoder.ex b/lib/shex/shexj/decoder.ex index 6f5360e..0e01089 100644 --- a/lib/shex/shexj/decoder.ex +++ b/lib/shex/shexj/decoder.ex @@ -215,7 +215,7 @@ defmodule ShEx.ShExJ.Decoder do end end - defp to_triple_expression(%{type: "TripleConstraint"} = invalid, options) do + defp to_triple_expression(%{type: "TripleConstraint"} = invalid, _options) do {:error, "invalid TripleConstraint: #{inspect(invalid)}}"} end @@ -295,7 +295,7 @@ defmodule ShEx.ShExJ.Decoder do end defp to_annotation( - %{type: "Annotation", predicate: predicate, object: object} = annotation, + %{type: "Annotation", predicate: predicate, object: object} = _annotation, options ) when is_binary(predicate) do @@ -313,7 +313,7 @@ defmodule ShEx.ShExJ.Decoder do {:error, "invalid Annotation: #{inspect(invalid)}"} end - defp to_shape_expression_label("_:" <> bnode, options), + defp to_shape_expression_label("_:" <> bnode, _options), do: {:ok, RDF.bnode(bnode)} defp to_shape_expression_label(iri, options) when is_binary(iri), @@ -322,7 +322,7 @@ defmodule ShEx.ShExJ.Decoder do defp to_shape_expression_label(invalid, _), do: {:error, "invalid shape expression label: #{inspect(invalid)}}"} - defp to_triple_expression_label("_:" <> bnode, options), + defp to_triple_expression_label("_:" <> bnode, _options), do: {:ok, RDF.bnode(bnode)} defp to_triple_expression_label(iri, options) when is_binary(iri), @@ -373,7 +373,7 @@ defmodule ShEx.ShExJ.Decoder do {:ok, stem} end - defp to_value_set_value(%{exclusions: _} = stem_range, options) do + defp to_value_set_value(%{exclusions: _} = stem_range, _options) do {:ok, stem_range} end @@ -430,7 +430,7 @@ defmodule ShEx.ShExJ.Decoder do defp to_bool(invalid, _), do: {:error, "invalid boolean: #{inspect(invalid)}}"} - defp parse_json(content, _opts \\ []) do + defp parse_json(content, _opts) do Jason.decode(content, keys: :atoms!) rescue error in [ArgumentError] -> diff --git a/lib/shex/violation.ex b/lib/shex/violation.ex index cfaa04f..1465953 100644 --- a/lib/shex/violation.ex +++ b/lib/shex/violation.ex @@ -1,6 +1,12 @@ defmodule ShEx.Violation.Shared do @moduledoc false + @doc """ + A human representation of the violation. + + Currently it's the same as the reason, but might contain additional + information in the future. + """ def message(violation) do ShEx.Violation.reason(violation) end @@ -31,14 +37,6 @@ defprotocol ShEx.Violation do @doc false def reason_doc(violation) - - @doc """ - A human representation of the violation. - - Currently it's the same as the reason, but might contain additional - information in the future. - """ - defdelegate message(violation), to: ShEx.Violation.Shared end defmodule ShEx.Violation.NodeKindConstraint do diff --git a/mix.exs b/mix.exs index 6ec60cc..d749ed2 100644 --- a/mix.exs +++ b/mix.exs @@ -9,10 +9,11 @@ defmodule ShEx.MixProject do [ app: :shex, version: @version, - elixir: "~> 1.8", + elixir: "~> 1.19", start_permanent: Mix.env() == :prod, deps: deps(), elixirc_paths: elixirc_paths(Mix.env()), + compilers: [:leex, :yecc] ++ Mix.compilers(), # Hex package: package(), @@ -56,13 +57,13 @@ defmodule ShEx.MixProject do defp deps do [ - {:rdf, "~> 0.9"}, - {:flow, "~> 1.0"}, - {:jason, "~> 1.2"}, + {:rdf, "~> 2.0"}, + {:flow, "~> 1.2"}, + {:jason, "~> 1.4"}, # Development - {:credo, "~> 1.4", only: [:dev, :test], runtime: false}, - {:ex_doc, "~> 0.23", only: :dev, runtime: false} + {:credo, "~> 1.7", only: [:dev, :test], runtime: false}, + {:ex_doc, "~> 0.40", only: :dev, runtime: false} ] end diff --git a/mix.lock b/mix.lock index 1b643b3..b9bb53b 100644 --- a/mix.lock +++ b/mix.lock @@ -1,15 +1,18 @@ %{ - "bunt": {:hex, :bunt, "0.2.0", "951c6e801e8b1d2cbe58ebbd3e616a869061ddadcc4863d0a2182541acae9a38", [:mix], [], "hexpm", "7af5c7e09fe1d40f76c8e4f9dd2be7cebd83909f31fee7cd0e9eadc567da8353"}, - "credo": {:hex, :credo, "1.4.1", "16392f1edd2cdb1de9fe4004f5ab0ae612c92e230433968eab00aafd976282fc", [:mix], [{:bunt, "~> 0.2.0", [hex: :bunt, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: false]}], "hexpm", "155f8a2989ad77504de5d8291fa0d41320fdcaa6a1030472e9967f285f8c7692"}, - "decimal": {:hex, :decimal, "1.9.0", "83e8daf59631d632b171faabafb4a9f4242c514b0a06ba3df493951c08f64d07", [:mix], [], "hexpm", "b1f2343568eed6928f3e751cf2dffde95bfaa19dd95d09e8a9ea92ccfd6f7d85"}, - "earmark_parser": {:hex, :earmark_parser, "1.4.10", "6603d7a603b9c18d3d20db69921527f82ef09990885ed7525003c7fe7dc86c56", [:mix], [], "hexpm", "8e2d5370b732385db2c9b22215c3f59c84ac7dda7ed7e544d7c459496ae519c0"}, - "ex_doc": {:hex, :ex_doc, "0.23.0", "a069bc9b0bf8efe323ecde8c0d62afc13d308b1fa3d228b65bca5cf8703a529d", [:mix], [{:earmark_parser, "~> 1.4.0", [hex: :earmark_parser, repo: "hexpm", optional: false]}, {:makeup_elixir, "~> 0.14", [hex: :makeup_elixir, repo: "hexpm", optional: false]}], "hexpm", "f5e2c4702468b2fd11b10d39416ddadd2fcdd173ba2a0285ebd92c39827a5a16"}, - "flow": {:hex, :flow, "1.0.0", "3df0b6687ba01dae248c615d50e1f8b36631e3eb9b9a663adf38262035d9fc08", [:mix], [{:gen_stage, "~> 1.0", [hex: :gen_stage, repo: "hexpm", optional: false]}], "hexpm", "103e0d30539db120a432d6433123a6ed885b10bde244e9f4194e3beee080ac29"}, - "gen_stage": {:hex, :gen_stage, "1.0.0", "51c8ae56ff54f9a2a604ca583798c210ad245f415115453b773b621c49776df5", [:mix], [], "hexpm", "1d9fc978db5305ac54e6f5fec7adf80cd893b1000cf78271564c516aa2af7706"}, - "jason": {:hex, :jason, "1.2.2", "ba43e3f2709fd1aa1dce90aaabfd039d000469c05c56f0b8e31978e03fa39052", [:mix], [{:decimal, "~> 1.0 or ~> 2.0", [hex: :decimal, repo: "hexpm", optional: true]}], "hexpm", "18a228f5f0058ee183f29f9eae0805c6e59d61c3b006760668d8d18ff0d12179"}, - "makeup": {:hex, :makeup, "1.0.5", "d5a830bc42c9800ce07dd97fa94669dfb93d3bf5fcf6ea7a0c67b2e0e4a7f26c", [:mix], [{:nimble_parsec, "~> 0.5 or ~> 1.0", [hex: :nimble_parsec, repo: "hexpm", optional: false]}], "hexpm", "cfa158c02d3f5c0c665d0af11512fed3fba0144cf1aadee0f2ce17747fba2ca9"}, - "makeup_elixir": {:hex, :makeup_elixir, "0.15.0", "98312c9f0d3730fde4049985a1105da5155bfe5c11e47bdc7406d88e01e4219b", [:mix], [{:makeup, "~> 1.0", [hex: :makeup, repo: "hexpm", optional: false]}, {:nimble_parsec, "~> 1.1", [hex: :nimble_parsec, repo: "hexpm", optional: false]}], "hexpm", "75ffa34ab1056b7e24844c90bfc62aaf6f3a37a15faa76b07bc5eba27e4a8b4a"}, - "nimble_parsec": {:hex, :nimble_parsec, "1.1.0", "3a6fca1550363552e54c216debb6a9e95bd8d32348938e13de5eda962c0d7f89", [:mix], [], "hexpm", "08eb32d66b706e913ff748f11694b17981c0b04a33ef470e33e11b3d3ac8f54b"}, - "protocol_ex": {:hex, :protocol_ex, "0.4.3", "4acbe35da85109dc40315c1139bb7a65ebc7fc102d384cd8b3038384fbb9b282", [:mix], [], "hexpm", "6ca5ddb3505c9c86f17cd3f19838b34bf89966ae17078f79f81983b6a4391fe9"}, - "rdf": {:hex, :rdf, "0.9.0", "830e8966f85395a62ae6599e550f1b99fe0e6fef7ef5df5687f4a0471e3d5365", [:mix], [{:decimal, "~> 1.5", [hex: :decimal, repo: "hexpm", optional: false]}, {:protocol_ex, "~> 0.4", [hex: :protocol_ex, repo: "hexpm", optional: false]}], "hexpm", "ad9feea3ea4e71fb1354ed4d3f3ae7ae8634087959115ccc27c0eca790701022"}, + "bunt": {:hex, :bunt, "1.0.0", "081c2c665f086849e6d57900292b3a161727ab40431219529f13c4ddcf3e7a44", [:mix], [], "hexpm", "dc5f86aa08a5f6fa6b8096f0735c4e76d54ae5c9fa2c143e5a1fc7c1cd9bb6b5"}, + "credo": {:hex, :credo, "1.7.16", "a9f1389d13d19c631cb123c77a813dbf16449a2aebf602f590defa08953309d4", [:mix], [{:bunt, "~> 0.2.1 or ~> 1.0", [hex: :bunt, repo: "hexpm", optional: false]}, {:file_system, "~> 0.2 or ~> 1.0", [hex: :file_system, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: false]}], "hexpm", "d0562af33756b21f248f066a9119e3890722031b6d199f22e3cf95550e4f1579"}, + "decimal": {:hex, :decimal, "2.3.0", "3ad6255aa77b4a3c4f818171b12d237500e63525c2fd056699967a3e7ea20f62", [:mix], [], "hexpm", "a4d66355cb29cb47c3cf30e71329e58361cfcb37c34235ef3bf1d7bf3773aeac"}, + "earmark_parser": {:hex, :earmark_parser, "1.4.44", "f20830dd6b5c77afe2b063777ddbbff09f9759396500cdbe7523efd58d7a339c", [:mix], [], "hexpm", "4778ac752b4701a5599215f7030989c989ffdc4f6df457c5f36938cc2d2a2750"}, + "ex_doc": {:hex, :ex_doc, "0.40.1", "67542e4b6dde74811cfd580e2c0149b78010fd13001fda7cfeb2b2c2ffb1344d", [:mix], [{:earmark_parser, "~> 1.4.44", [hex: :earmark_parser, repo: "hexpm", optional: false]}, {:makeup_c, ">= 0.1.0", [hex: :makeup_c, repo: "hexpm", optional: true]}, {:makeup_elixir, "~> 0.14 or ~> 1.0", [hex: :makeup_elixir, repo: "hexpm", optional: false]}, {:makeup_erlang, "~> 0.1 or ~> 1.0", [hex: :makeup_erlang, repo: "hexpm", optional: false]}, {:makeup_html, ">= 0.1.0", [hex: :makeup_html, repo: "hexpm", optional: true]}], "hexpm", "bcef0e2d360d93ac19f01a85d58f91752d930c0a30e2681145feea6bd3516e00"}, + "file_system": {:hex, :file_system, "1.1.1", "31864f4685b0148f25bd3fbef2b1228457c0c89024ad67f7a81a3ffbc0bbad3a", [:mix], [], "hexpm", "7a15ff97dfe526aeefb090a7a9d3d03aa907e100e262a0f8f7746b78f8f87a5d"}, + "flow": {:hex, :flow, "1.2.4", "1dd58918287eb286656008777cb32714b5123d3855956f29aa141ebae456922d", [:mix], [{:gen_stage, "~> 1.0", [hex: :gen_stage, repo: "hexpm", optional: false]}], "hexpm", "874adde96368e71870f3510b91e35bc31652291858c86c0e75359cbdd35eb211"}, + "gen_stage": {:hex, :gen_stage, "1.3.2", "7c77e5d1e97de2c6c2f78f306f463bca64bf2f4c3cdd606affc0100b89743b7b", [:mix], [], "hexpm", "0ffae547fa777b3ed889a6b9e1e64566217413d018cabd825f786e843ffe63e7"}, + "jason": {:hex, :jason, "1.4.4", "b9226785a9aa77b6857ca22832cffa5d5011a667207eb2a0ad56adb5db443b8a", [:mix], [{:decimal, "~> 1.0 or ~> 2.0", [hex: :decimal, repo: "hexpm", optional: true]}], "hexpm", "c5eb0cab91f094599f94d55bc63409236a8ec69a21a67814529e8d5f6cc90b3b"}, + "makeup": {:hex, :makeup, "1.2.1", "e90ac1c65589ef354378def3ba19d401e739ee7ee06fb47f94c687016e3713d1", [:mix], [{:nimble_parsec, "~> 1.4", [hex: :nimble_parsec, repo: "hexpm", optional: false]}], "hexpm", "d36484867b0bae0fea568d10131197a4c2e47056a6fbe84922bf6ba71c8d17ce"}, + "makeup_elixir": {:hex, :makeup_elixir, "1.0.1", "e928a4f984e795e41e3abd27bfc09f51db16ab8ba1aebdba2b3a575437efafc2", [:mix], [{:makeup, "~> 1.0", [hex: :makeup, repo: "hexpm", optional: false]}, {:nimble_parsec, "~> 1.2.3 or ~> 1.3", [hex: :nimble_parsec, repo: "hexpm", optional: false]}], "hexpm", "7284900d412a3e5cfd97fdaed4f5ed389b8f2b4cb49efc0eb3bd10e2febf9507"}, + "makeup_erlang": {:hex, :makeup_erlang, "1.0.3", "4252d5d4098da7415c390e847c814bad3764c94a814a0b4245176215615e1035", [:mix], [{:makeup, "~> 1.0", [hex: :makeup, repo: "hexpm", optional: false]}], "hexpm", "953297c02582a33411ac6208f2c6e55f0e870df7f80da724ed613f10e6706afd"}, + "nimble_parsec": {:hex, :nimble_parsec, "1.4.2", "8efba0122db06df95bfaa78f791344a89352ba04baedd3849593bfce4d0dc1c6", [:mix], [], "hexpm", "4b21398942dda052b403bbe1da991ccd03a053668d147d53fb8c4e0efe09c973"}, + "protocol_ex": {:hex, :protocol_ex, "0.4.4", "c9717d1c0bdabe37d7653965dc02e78580d0d06a1f86d737b7941b55241f70d6", [:mix], [], "hexpm", "2b78ed0e5ec76f62b0debaf92dc8e795551cdaf7fc22b8816b3d57225020ac99"}, + "rdf": {:hex, :rdf, "2.0.1", "6bb46647f27baf066df0e3430c07560f2d2867a8189ef3fd2ac5decb20975ea5", [:mix], [{:decimal, "~> 1.5 or ~> 2.0", [hex: :decimal, repo: "hexpm", optional: false]}, {:protocol_ex, "~> 0.4.4", [hex: :protocol_ex, repo: "hexpm", optional: false]}, {:uniq, "~> 0.6", [hex: :uniq, repo: "hexpm", optional: false]}], "hexpm", "a3ced005b4c8b3754acdf84e24d2cc7c45fbac38742276bbdb6af070fcb85cdf"}, + "uniq": {:hex, :uniq, "0.6.2", "51846518c037134c08bc5b773468007b155e543d53c8b39bafe95b0af487e406", [:mix], [{:ecto, "~> 3.0", [hex: :ecto, repo: "hexpm", optional: true]}], "hexpm", "95aa2a41ea331ef0a52d8ed12d3e730ef9af9dbc30f40646e6af334fbd7bc0fc"}, } diff --git a/test/shex_test_suite_test.exs b/test/shex_test_suite_test.exs index ca72108..f893587 100644 --- a/test/shex_test_suite_test.exs +++ b/test/shex_test_suite_test.exs @@ -187,8 +187,8 @@ defmodule ShEx.TestSuiteTest do # TODO: The schemas for these seem to be different ... see also "schemas" tests test_case_name = TestSuite.test_case_name(test_case) - unless String.starts_with?(test_case_name, "FocusIRI2groupBnodeNested2groupIRIRef") or - String.starts_with?(test_case_name, "FocusIRI2EachBnodeNested2EachIRIRef") do + if !(String.starts_with?(test_case_name, "FocusIRI2groupBnodeNested2groupIRIRef") or + String.starts_with?(test_case_name, "FocusIRI2EachBnodeNested2EachIRIRef")) do assert shexj_schema == schema end end diff --git a/test/support/shex_test_suite.ex b/test/support/shex_test_suite.ex index 6d94ea8..892dc06 100644 --- a/test/support/shex_test_suite.ex +++ b/test/support/shex_test_suite.ex @@ -101,5 +101,5 @@ defmodule ShEx.TestSuite do end defp value(description, property), - do: Description.first(description, property) |> to_string + do: Description.first(description, property) |> to_string() end